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. On Thu, 21 Dec 2023 at 20:21, 'TheDiveO' via golang-nuts < golang-nuts@googlegroups.com> wrote: > The issue is also reproducible using Python3 on macOS, whereas it works as > expected once again on Linux; just for reference here's the corresponding SO > question > <https://stackoverflow.com/questions/77700314/detecting-named-pipe-reader-disconnect-using-select-poll-fails-on-macos-works-o>. > To a large extend, this now excludes potential Go and/or > Ginkgo/Gomega-related effects, yet is consistent with my original > observation and question here. > > On Sunday, December 17, 2023 at 6:02:17 AM UTC+1 Kurtis Rader wrote: > > On Sat, Dec 16, 2023 at 7:54 AM 'TheDiveO' via golang-nuts < > golan...@googlegroups.com> wrote: > > [...] > > I only glanced at your unit test but the sleeps and goroutines without any > explicit synchronization (e.g., using a sync.WaitGroup) look to me like a > source of non-deterministic behavior. > > [...] > > -- > 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/a7fe0e6e-d6b0-4881-a02c-61516684caf9n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/a7fe0e6e-d6b0-4881-a02c-61516684caf9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAA38peYhwUEi6n6T624iwbzdrEkVKqZRr31bUMosWj_-RRJz7w%40mail.gmail.com.