Le mercredi 05 décembre 2012 à 19:41 +0100, Michal Kubecek a écrit :
On Wed, Dec 05, 2012 at 11:22:07AM -0400, Giacomo Comes wrote:
There is certanly a SIGPIPE issue here, but I'm not sure cpio is the one to blame, or at least the only one, for the following reasons:
1) the script fails if I run it on openSUSE 12.2 using the cpio binary from 11.3, but it doesn't fail if I run it on openSUSE 11.3 using the cpio binary from 12.2 (the version of cpio is 2.11 since openSUSE 11.3)
I guess it is up to you to find out what exactly is different. Maybe different contents of initrd, maybe different pipe buffer size. Using strace on cpio may help a lot.
2) simply running: cpio --quiet -t
...and so does
false | true ; echo $?
In both cases it doesn't say anything about the return code of first command in the pipeline. See bash(1): "The return status of a pipeline is the exit status of the last command, unless the pipefail option is enabled."
Note that you can access the status of every command in a pipe using ${PIPESTATUS[0]}, ${PIPESTATUS[1]} etc. -- Jean Delvare Suse L3 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org