On Tuesday 04 of December 2012 13:05EN, Giacomo Comes wrote:
But if I add the option -q to grep:
if cpio --quiet -t <initrd.cpio ; then echo true-$? >&2 ; else echo
false-$? >&2 ; fi | grep -q libz
the output is:
instead of the correct one:
Return code 141 means the process was killed by signal 141 - 128 = 13
which is SIGPIPE. And grep(1) tells you that with "-q", grep exits
immediately as soon as it finds a match. Unfortunately cpio doesn't
handle SIGPIPE so it fails when grep exits.
You can either try to report it as a cpio bug or use a simple workaround
if ... fi | cat | grep -q libz
Anyway, this is definitely not a kernel problem.
To unsubscribe, e-mail: opensuse-kernel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner(a)opensuse.org