This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tar --atime-preserve with an empty file triggers a warning

On 03/07/2011 07:20 AM, EXCOFFIER Denis wrote:
> Hello,
> I've the experienced the following (100% reproducible under 1.7.7-1 or
> 1.7.8-1):
> % cp /dev/null empty

Why not the much simpler:

: > empty

> % tar cf empty.tar --atime-preserve empty
> /usr/bin/tar: empty: Cannot utime: Invalid argument
> /usr/bin/tar: Exiting with failure status due to previous errors
> %
> Of course the empty.tar is created as expected (ie identical as without
> `--atime-preserve). The warning is not produced on Solaris, Darwin or
> Linux,
> therefore i contacted this list. Do you think, with your expertise, that i
> should contact bug-tar also?

No, this list is correct.  utime should not fail on an empty file, so
you've probably exposed a bug in cygwin1.dll.

Also, be aware that on cygwin, you _can't_ preserve symlink or directory
atimes, as the mere act of lstat'ing those files causes cygwin to make
windows syscalls that end up altering the access times on those types of
files (but generally, the atime on directories and symlinks is not as
interesting as the atime on regular files).

Eric Blake    +1-801-349-2682
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]