GNU bug report logs - #32943
grep pattern < fifo fails on Cygwin (and MinGW), but not on Linux

Previous Next

Package: grep;

Reported by: Houder <houder <at> xs4all.nl>

Date: Fri, 5 Oct 2018 10:15:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Houder <houder <at> xs4all.nl>, 32943 <at> debbugs.gnu.org
Subject: bug#32943: grep pattern < fifo fails on Cygwin (and MinGW), but not on Linux
Date: Mon, 8 Oct 2018 08:49:24 -0700
On 10/8/18 12:35 AM, Houder wrote:
> grep terminates with an error on Cygwin because lseek() on Cygwin 
> fails to
> ascertain that it is applied to a FIFO. 


That sounds like a bug in Cygwin, then. Can you find out exactly why it 
occurs, by using GDB within Cygwin? Then you can file a bug report with 
the Cygwin folks.

Possibly the bug is something like the following: grep calls lseek (fd, 
0, SEEK_CUR). The Cygwin lseek implementation asks MS-Windows what the 
file offset is, gets an error because the file descriptor is that of a 
pipe, and somehow turns that into EINVAL. Cygwin should turn it into 
ESPIPE instead.





This bug report was last modified 5 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.