[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-grep] [patch] getting '--devices=skip' to work

From: Tony Abou-Assaleh
Subject: Re: [bug-grep] [patch] getting '--devices=skip' to work
Date: Wed, 17 Nov 2004 23:16:00 -0400 (AST)

By just looking at the patch (not tested), is there a reason for changing
'fstat' to 'stat' in 'fstat (fd, &stats->stat)'?


Tony Abou-Assaleh
Ph.D. Candidate, Faculty of Computer Science
Chair of the Dalhousie Student Chapter of the ACM
Dalhousie University, Halifax, NS, Canada, B3H 1W5
Fax:   902-492-1517
Email: address@hidden
WWW:   http://www.cs.dal.ca/~taa/
---------------------[THE END]--------------------

On Wed, 17 Nov 2004, Benno Schulenberg wrote:

> Hi all,
> When running grep with --devices=skip it nevertheless hangs when
> coming across a fifo.  It appears to hang on line 898 of grep.c:
>     while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
>       continue;
> The checks on the file type and the skipping statements come too
> late.  The attached patch moves those lines and adds a check on
> fifos.  It works for me, grep now skips all devices and fifos when
> '-D skip' is given.  Some of the lines that come after the patch
> are made superfluous, but I haven't bothered with those.
> Is this fix any good?  What does it break?
> Benno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]