Richard Thomas <[EMAIL PROTECTED]> ha escrit:

> It appears that tar is returning 1
> when a file changes when being read (I have verified this by tarring
> the output of tar).

Yes, it does, and it was stated explicitly in the release notice for
version 1.16 (see the NEWS file):

  * After creating an archive, tar exits with code 1 if some files were
  changed while being read.  Previous versions exited with code 2 (fatal
  error), and only if some files were truncated while being archived.

Similarly, the documentation (section 3.1 "General Synopsis of `tar'"),
states:

   Possible exit codes of GNU `tar' are summarized in the following
   table:
   [...]
   1   `Some files differ'.  If tar was invoked with `--compare'
       (`--diff', `-d') command line option, this means that some
       files in the archive differ from their disk counterparts (*note
       compare::).  If tar was given `--create', `--append' or `--update'
       option, this exit code means that some files were changed while
       being archived and so the resulting archive does not contain the
       exact copy of the file set.

(see http://www.gnu.org/software/tar/manual/html_node/Synopsis.html)       
        
> But when I run the example, it too returns 1.

As far as I can tell, it does everything right. According to your listing,
dd finished its job after tar had finished creating the archive. This
means that while creating the archive, the contents of file `file' has
changed, which caused tar to exit with the code 1.

Regards,
Sergey


Reply via email to