On Thu, Dec 21, 2023 at 5:40 PM Steven Hartland <stevenmhartl...@gmail.com>
wrote:

> poll and select for this behavior was broken in FreeBSD up until 195423
> <http://svn.freebsd.org/changeset/base/195423> was committed as detailed
> by this bug report
> <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=94772>.
>
> Given the MacOS and FreeBSD have related history I wouldn't be surprised
> if this is a bug in the OS implementation with poll on MacOS.
>

Thanks for the link to that bug report. It was opened when I was a senior
support engineer at IBM doing, primarily, Linux and DYNIX/ptx kernel crash
analysis and dealing with similar problems. The latter OS was because I had
been doing the same job when IBM purchased Sequent Computer Systems. I
don't recall any customer reporting this "bug" for either OS in 2006, but
since DYNIX/ptx was derived from AT&T UNIX System V (aka SVR5) it is likely
it exhibited the same behavior (i.e., "bug") as macOS does today.

Whether that behavior is "broken" is debatable since the behavior is likely
the documented, or at least expected behavior when the syscall was
introduced. If you read that bug report you'll notice comments that the old
behavior was consistent with the relevant standards. Which is not to say
that behavior is optimal. Changes since 2006 by FreeBSD and Linux clearly
represent improvements to the semantics of polling/selecting a FIFO file
descriptor. But someone needs to open an issue with Apple and convince them
to adopt the same improvement. This isn't something that the Go ecosystem
can workaround. Too, for many use cases switching from a named fifo to
something like a unix domain socket will provide the desired behavior on
all the supported platforms.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-s5XEieOFRNXREqQqDXZzqBNTwQH-8%3DTXWunfT89Epwg%40mail.gmail.com.

Reply via email to