delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/09/03:54:46

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 9 Feb 2010 09:54:26 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: poll() on fifo read descriptor with non-zero timeout ==> segfault
Message-ID: <20100209085426.GW28659@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4B6E470D DOT 9080607 AT monai DOT ca>
MIME-Version: 1.0
In-Reply-To: <4B6E470D.9080607@monai.ca>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Feb  6 20:52, Steven Monai wrote:
> Hi folks,
> 
> Here is a short test case I've named "fifo-read.c":
> [...]
> Here's what happens at the command line:
> 
> $ uname -a
> CYGWIN_NT-5.1 lonestar 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin
> 
> $ gcc-4 -Wall -Werror -ansi -pedantic -o fifo-read fifo-read.c
> 
> $ mkfifo -m0600 myfifo
> 
> $ ls -l
> total 29
> -rw-r--r--+ 1 steve None   939 2010-02-06 20:25 fifo-read.c
> -rwxr-xr-x+ 1 steve None 22792 2010-02-06 20:25 fifo-read.exe
> prw-------  1 steve None     0 2010-02-06 20:25 myfifo
> 
> $ ./fifo-read
> About to enter poll()
> Segmentation fault (core dumped)
> 
> 
> If I change the timeout to a positive number, it also segfaults.
> 
> If I change the timeout to zero, it works, but poll() returns
> immediately with no descriptor ready to read. Not very useful.
> 
> I get identical results on two different machines, with two different
> OSes (XP and 2000). Can anyone else reproduce this? Am I using poll()
> incorrectly?

Can you check with the latest snapshot from http://cygwin.com/snapshots,
please?  I can not reproduce the above crash with your test application
when using Cygwin from CVS, neither on XP, nor on Windows 7.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


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