[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] tar -tf quits before EOF?

From: Sergey Poznyakoff
Subject: Re: [Bug-tar] tar -tf quits before EOF?
Date: Sat, 07 Aug 2010 09:29:03 +0300

Dustin J. Mitchell <address@hidden> ha escrit:

> My understanding is that tar should keep running until it gets EOF on
> its input - that there's no explicit indication within a tarfile that
> would cause tar to exit normally without reading to EOF.

Not quite so. The end of archive is marked by two zero blocks
(not being part of any archive member of course). When tar
sees this marker it exits without attempting to read any further.
This behavior may be disabled by using the -i (--ignore-zeros)
command line option.
>   (tar -cf - ChangeLog; cat /dev/zero) |  tar -tf -
>   ChangeLog
> (this hangs forever here, and truss or strace shows tar reading a lot
> of 0's without any _exit(0) action..)

Looks like you run an older version of tar.  This was the default
behavior before version 1.21.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]