delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/07/09:44:28

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 7 Mar 2011 15:43:49 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: tar --atime-preserve with an empty file triggers a warning
Message-ID: <20110307144349.GE18640@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20110307152005 DOT 17292u50da242vth AT messagerie DOT si DOT c-s DOT fr> <4D74EC98 DOT 7090803 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4D74EC98.7090803@redhat.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mar  7 07:32, Eric Blake wrote:
> 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.

THis looks like a tar bug, per the strace.  For some reason, if the
file is empty, tar calls futimens on file descriptor 0 (which is
connected to /dev/tty1 in my case), while it call futimens on
file descriptor 4 (connected to the file empty) if the file empty
is... well, not empty.


Corinna


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019