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

On Mar  7 08:07, Eric Blake wrote:
> [adding bug-tar]
> 
> On 03/07/2011 07:43 AM, Corinna Vinschen wrote:
> > 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.
> 
> This is indeed multiple bug reports for the price of 1 :)
> [...]
> Finally, cygwin is failing with EINVAL for futimens on a pty fd.
> However, I don't know if that's something that we can change, since
> cygwin doesn't really maintain a notion of changeable times on ptys at
> the moment.

Please take this as granted for now.  Ptys/ttys are implemented using
other Windows objects (events, pipes, etc) and none of them supports
setting a file time.  I don't know if faking the ability to set the
filetime is really feasible.

Maybe we should just return EPERM?


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

