poll() on fifo read descriptor with non-zero timeout ==> segfault

Steven Monai steve+cygwin@monai.ca
Sun Feb 7 21:24:00 GMT 2010

Hi again,

More information on this issue: My test case runs correctly and
crash-free in Linux. This leads me to believe this is a bug in Cygwin's
poll(). Even worse, after having adapted the test case to use select()
instead of poll(), it appears that select() has the same bug.

I've been trying to get Bernstein's 'daemontools' package to work in
Cygwin, and it uses poll() to wait on a fifo's non-blocking-read
descriptor in at least one program (in 'supervise', in case anyone is
interested). Somehow, though, that code does not segfault. Instead, it
effectively blocks forever (until killed), as all other processes are
strangely prevented from writing to the fifo by "device busy" errors.

Anyway, it's been quite an interesting puzzle, but I'm going to set it
aside for now. Hopefully my bug report will be of some use to someone.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list