emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#20902: closed ([BUG] hang at fifo despite of '-D s


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20902: closed ([BUG] hang at fifo despite of '-D skip')
Date: Fri, 26 Jun 2015 23:52:02 +0000

Your message dated Fri, 26 Jun 2015 16:50:52 -0700
with message-id <address@hidden>
and subject line Re:  [BUG] hang at fifo despite of '-D skip'
has caused the debbugs.gnu.org bug report #20902,
regarding [BUG] hang at fifo despite of '-D skip'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20902: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20902
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [BUG] hang at fifo despite of '-D skip' Date: Fri, 26 Jun 2015 11:40:29 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1
Hello,

'grep -D skip' hangs when examining a FIFO.

This is a regression. It has been working since 2.5.2 (commit
5c7194f9e739082dc14f75769f2c19a39bb6cf84).
Debian 6.0.10 has 2.6.3 and there it's working, too. But 2.12 in debian
7.8 has the problem.  Don't know exactly when it changed.

The help (and manual) states:
  -D, --devices=ACTION      how to handle devices, FIFOs and sockets;
                            ACTION is 'read' or 'skip'

>From this I expect, that grep will skip a FIFO and not block while
trying to handle it.

You can test for this error with this commands:

-8<-----------------------------------------------------
mkfifo myfifo
grep -D skip foo myfifo &
PID=$!
sleep 1
kill $PID 2>/dev/null && echo fail || echo ok
-8<-----------------------------------------------------

and here is the same idea as test for the test-suite:

#+FILE: tests/skip-fifo
-8<-----------------------------------------------------
#!/bin/sh
# grep must ignore a fifo when started with -D skip

. "${srcdir=.}/init.sh"; path_prepend_ ../src

mkfifo myfifo

grep -D skip foo myfifo &
PID=$!
# just to make sure
sleep 1
kill $PID && fail=1

# the other way round
grep foo myfifo &
PID=$!
# just to make sure
sleep 1
kill $PID || fail=1

Exit $fail
-8<-----------------------------------------------------

Best regards
Uwe Koloska



--- End Message ---
--- Begin Message --- Subject: Re: [BUG] hang at fifo despite of '-D skip' Date: Fri, 26 Jun 2015 16:50:52 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 Thanks for reporting this bug. I installed the attached into the grep master on savannah, and it (or something like it) should appear in the next release.

Attachment: 0001-grep-don-t-hang-on-command-line-fifo-if-D-skip.patch
Description: Text Data


--- End Message ---

reply via email to

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