This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.17: problem building GNU screen


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Christopher Faylor on 6/18/2005 9:45 AM:
> IMO, the posted check for fifos is flawed in that it assumes that
> writing to a fifo will not block if there is no reader on the fifo.
> That's not true for cygwin.

The posted check for fifos used the O_NONBLOCK flag when opening the fifo
for writing, and POSIX requires that write() on an non-blocking fifo must
not block.  If this is not the case, then cygwin fifos are still broken.
But when O_NONBLOCK is not set, you are correct that cygwin (and in fact,
any implementation) can block on write() when there are no readers.

However, the posted test also mentions in its comment that fifos with
O_RDWR mode are used for BROKEN_PIPE and select() under 386BSD, and O_RDWR
mode on fifos is non-portable (not specified by POSIX).  Thus, cygwin has
no requirements to make O_RDWR match what any other implementation might
do, and portable programs should not be using O_RDWR on fifos.

One other comment, is that the original poster's complaint showed that
configure sleeps for 5 seconds, but the fifo test code calls alarm(5).
Tto ensure that the conftest.exe has completed, configure could be changed
to sleep for 6 seconds, rather than guessing which process (the sleep, or
conftest.exe) will wake up first.
- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCuqzn84KuGfSFAYARAnTiAKC8B3UWKSfTLAylYxQ86TktUahS8QCgrpuj
rmTCw5bsUXU0nz7Tfscl/kI=
=YPRL
-----END PGP SIGNATURE-----

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]