X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
X-Cloudmark-SP-Filtered: true
X-Cloudmark-SP-Result: v=1.0 c=1 a=vBN2SCr-IrkA:10 a=kCKDY91tEBMc+hi4YtGk8Q==:17  a=ASQrQBQT9jrj0VBAoicA:9 a=AkSJ--W2yS7inm0PXwpnlX_mMLUA:4
Message-ID: <4B6F2F7C.9080809@monai.ca>
Date: Sun, 07 Feb 2010 13:24:12 -0800
From: Steven Monai <steve+cygwin@monai.ca>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: poll() on fifo read descriptor with non-zero timeout ==> segfault
References: <4B6E470D.9080607@monai.ca>
In-Reply-To: <4B6E470D.9080607@monai.ca>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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.

-SM
--

--
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

