[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-grep] [patch] getting '--devices=skip' to work
From: |
Benno Schulenberg |
Subject: |
[bug-grep] [patch] getting '--devices=skip' to work |
Date: |
Wed, 17 Nov 2004 21:45:09 +0100 |
User-agent: |
KMail/1.5.4 |
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
grep-2.5.1a-skipdevices.patch
Description: Text Data
- [bug-grep] [patch] getting '--devices=skip' to work,
Benno Schulenberg <=