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: poll() on fifo read descriptor with non-zero timeout ==> segfault


On Tue, Feb 09, 2010 at 09:54:26AM +0100, Corinna Vinschen wrote:
>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.

Relevant threads:

http://cygwin.com/ml/cygwin/2009-12/threads.html#00685
http://cygwin.com/ml/cygwin/2010-01/msg00067.html

Bottom line: The crash is fixed but cygwin still doesn't work right.

cgf

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


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