[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: |
Eric Blake |
Subject: |
Re: [PATCH] Terminate zgrep gracefully when a pipeline is interrupted by a signal |
Date: |
Mon, 01 Feb 2010 20:00:20 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
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
'test x -a y' is not portable. Use test x && test y.
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
signature.asc
Description: OpenPGP digital signature