Jim Meyering <[EMAIL PROTECTED]> wrote:
> If tar is run in the following manner:
> - in --create mode, with a named target (i.e., not stdout),
> - with stderr closed, and
> - in a way that provokes tar to write a diagnostic,
> then tar corrupts the named output archive by writing the diagnostic it.
>
> Here's a demo:
>
> $ rm -rf a; mkdir -p a/b; chmod 0 a/b; tar cf x.tar a 2>&-; \
> head -c39 x.tar|grep tar: ; chmod -R 700 a; rm -rf a
> tar: a: Cannot open: Permission denied
>
> That shows that the first line of the created archive, x.tar,
> is tar's own diagnostic.
Besides the fact that "head -c39 x.tar" is illegal ans will cause this
error message: head: Ungültige Option -- c
It needs to be "head -39c x.tar"...
What you see is definitely not a GNU tar bug - it happens with every tar
implementation (except star in default mode that forks, creates a FIFO
and a pipe that will get fd#2 and close it in the tar process... with
star -no-fifo .... you get the same).
What you describe is not a bug in GNU tar (or any tar) but it is a result
of "what you see is what you told sh...".
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar