On Monday 29 December 2008 05:48:54 Sergey Poznyakoff wrote:
> Hi Mike,
> > you may say "well just check the exit status of tar and go with that",
> > but that doesnt work for cases where the decompressor
> > crashes/exits/whatever early on and tar gets a short archive.
>
> For the best of my knowledge, it does work for these cases as well. When
> extracting using a decompressor, the only signal tar tolerates is
> SIGPIPE. If the decompressor exits due to any other signal, or simply
> exits with a non-0 exit code, tar reports it and exits with code 2. In
> its turn, SIGPIPE can be delivered to the decompressor only because tar
> has closed its side of the pipe. In that case tar either knows what it is
> doing (as in the described case), or issues error message, if exiting
> due to some earlier error.

i dont have a full list of issues available as they've been lost to time, but 
i do recall that there have been issues in the past where tar exited with 0 
for whatever reason even though the decompression step failed.  this is 
exactly why the bash pipestatus checking was added to Gentoo (and ive added it 
myself in a place or two).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to