Pádraig Brady <[email protected]> writes: > On 22/11/2026 02:38, Collin Funk wrote: >> This only affects platforms where iopoll uses poll instead of select. >> * src/iopoll.c (iopoll_internal): Don't ignore POLLERR, POLLHUP, and >> POLLNVAL events when BROKEN_OUTPUT is false. >> * tests/tee/tee.sh: Add a test case. >> * NEWS: Mention the bug fix. > > Ah one can get error events even with just POLLOUT set. > Patch looks good.
Yep, POSIX says [1]: In addition, poll() or ppoll() shall set the POLLHUP, POLLERR, and POLLNVAL flag in revents if the condition is true, even if the application did not set the corresponding bit in events. >> + 'tee' no longer infinite loops when the reader of a full non-blocking >> output >> + pipe exits. This issue only affects platforms where poll is used instead >> of >> + select: AIX, Solaris, Linux, Android, and macOS 11 or later. >> + [bug introduced in coreutils-9.2] > > I wouldn't bother listing "only affects" as most platforms > coreutils is used on are affected. I'd nearly not say anything about > platforms at all. Sounds good to me. I left a note that the bug only applies to the poll implementation in the commit message, since it seemed useful enough. But I removed the note from NEWS. Collin [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/poll.html
