summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2021-12-25 11:27:20 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2021-12-25 11:27:20 +0000
commitb03582db60d9b741c09567a7a88b07ebe74e5eae (patch)
tree368bc8c578ec2b5e63c4a9225d8d7e19dca2280b /regress
parent778880db2d72212c998331abce672c41b0a690bc (diff)
Adjust pty case for kqueue-based poll(2)
Unlike the old code, kqueue-based poll(2) sets POLLIN when the other end of a pty has been closed. Calling read(2) on such a pty returns zero anyway. FreeBSD sets POLLIN too.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/kern/poll/poll_iocond.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/regress/sys/kern/poll/poll_iocond.c b/regress/sys/kern/poll/poll_iocond.c
index ad4d7eb6d49..a292bd9166c 100644
--- a/regress/sys/kern/poll/poll_iocond.c
+++ b/regress/sys/kern/poll/poll_iocond.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: poll_iocond.c,v 1.1 2021/12/06 05:52:07 visa Exp $ */
+/* $OpenBSD: poll_iocond.c,v 1.2 2021/12/25 11:27:19 visa Exp $ */
/*
* Copyright (c) 2021 Visa Hankala
@@ -804,14 +804,8 @@ proc_parent(int fd, int bfd)
assert(pfd[0].revents == POLLHUP);
assert(pfd[1].revents == POLLHUP);
#else
- /* XXX */
- if (filetype == FTYPE_PTY) {
- assert(pfd[0].revents == POLLHUP);
- assert(pfd[1].revents == POLLHUP);
- } else {
- assert(pfd[0].revents == (POLLIN | POLLHUP));
- assert(pfd[1].revents == POLLHUP);
- }
+ assert(pfd[0].revents == (POLLIN | POLLHUP));
+ assert(pfd[1].revents == POLLHUP);
#endif
break;
case FTYPE_SOCKET_TCP: