Jim Meyering <[EMAIL PROTECTED]> wrote:
> > It needs to be "head -39c x.tar"...
>
> Oh, I see. `head -c39' works fine with GNU head, so you must be
> using some other version. I agree that using -39c is more portable.
If your head program accepts -c39, I would call this a bug.
> The bug is that tar assumed open/creat would never return 2.
> The patch I supplied shows that this bug in GNU tar can be fixed
> with minimal effort.
I see nothing in your patch that could change the behavior.
But the problem not is that a program incorrectly asumes that open()
would never return 2.
The "problem" is that the program correctly asumes that stderr is an
open fd at program startup. There was a related discussion some time
before on the POSIX mailing list.
With star in (default mode with FIFO) you get even other problems.
The libschily error output rutines check the write(2) return code
and abort star because of the write problem when fd#2 is not open.
If I recall the POSIX discussion correctly, if POSIX would explicitly
allow this, the correct fix would be to enhance the startup code before
main() is called to make sure that things are as expected.....
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