delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/23/08:37:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42BAACE7.1090306@byu.net>
Date: Thu, 23 Jun 2005 06:36:56 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.5.17: problem building GNU screen
References: <uoea630iy.wl%atara-y AT mx DOT scn DOT tv> <d90v40$rsl$1 AT sea DOT gmane DOT org> <20050618154511 DOT GB23351 AT trixie DOT casa DOT cgf DOT cx>
In-Reply-To: <20050618154511.GB23351@trixie.casa.cgf.cx>
X-IsSubscribed: yes

-----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 AT byu DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019