Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > be362e58a29b87691bc4a41b657a593a > files > 1

gzip-1.3.13-4.fc13.src.rpm

--- gzip-1.3.10/zgrep.in.pom	2006-12-30 04:01:51.000000000 +0100
+++ gzip-1.3.10/zgrep.in	2007-02-06 10:54:33.000000000 +0100
@@ -146,7 +146,7 @@
 
 exec 3>&1
 res=0
-
+trap break SIGPIPE
 for i
 do
   # Fail if gzip or grep (or sed) fails.
@@ -190,5 +190,8 @@
   r=$?
   test "$gzip_status" -eq 0 || test "$gzip_status" -eq 2 || r=2
   test $res -lt $r && res=$r
+  # SIGPIPE + 128
+  test "$r" -eq 141 && exit $res 
 done
+trap - SIGPIPE
 exit $res