[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Terminate zgrep gracefully when a pipeline is interrupted by
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Terminate zgrep gracefully when a pipeline is interrupted by a signal |
Date: |
Wed, 03 Feb 2010 06:32:52 +0100 |
Dmitry V. Levin wrote:
> On Mon, Feb 01, 2010 at 08:00:20PM -0700, Eric Blake wrote:
>> According to Dmitry V. Levin on 2/1/2010 3:35 PM:
>> > (eval "$grep" 4>&-; echo $? >&4) 3>&- | sed "$sed_script" >&3 4>&-
>> > - ) || r=2
>> > - exit $r
>> > + ) && exit $r
>> > + r=$?
>> > + test $r -gt 128 -a $r -le 143 && exit $r || exit 2
Thanks for the fix!
>> 'test x -a y' is not portable. Use test x && test y.
>
> OK, shall I repost the patch with these changes applied?
Not required, but would be nice.
If it's not too much trouble, would you please add a test, too?