NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/59056 CVS commit: src/tests/kernel/kqueue/write
The following reply was made to PR kern/59056; it has been noted by GNATS.
From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/59056 CVS commit: src/tests/kernel/kqueue/write
Date: Sat, 3 Oct 2026 21:06:05 +0000
Module Name: src
Committed By: riastradh
Date: Sat Oct 3 21:06:05 UTC 2026
Modified Files:
src/tests/kernel/kqueue/write: t_pipe.c
Log Message:
kqueue/kernel/t_pipe: Fix newly failing test.
If the read side of a pipe has been closed, then for the write side:
- poll will set POLLOUT, not POLLNVAL (nor fail with EBADF), and
- select will report writable, not fail with EBADF,
because the write side is immediately writable and will fail with
EPIPE/SIGPIPE -- it won't block if you try to write.
So surely kqueue with EVFILT_WRITE should simply report immediately
writable too, not fail with EBADF. And that is what I caused to
happen by simplifying and clarifying the code and fixing various edge
cases. (The bad response that this test was added to check is a
kernel crash on null pointer dereference; that, fortunately, has not
regressed.)
PR kern/59056: poll POLLHUP bugs
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/kqueue/write/t_pipe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index