X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 6 Mar 2008 14:45:46 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: bug with touch t/
Message-ID: <20080306134546.GQ18407@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <loom.20080304T214047-23@post.gmane.org> <20080305183640.GI18407@calimero.vinschen.de> <47CFEE38.5040905@byu.net> <20080306132748.GP18407@calimero.vinschen.de> <47CFF263.90804@byu.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <47CFF263.90804@byu.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
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  6 06:32, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Corinna Vinschen on 3/6/2008 6:27 AM:
> |
> | I examined this situation on Linux.  In Linux, touch tries to open t\
> | and open() returns EISDIR.  The fact that you see an ENOENT is a result
> | of touch trying to use other methods to set the time:
>
> In other words, Linux does it wrong, too.  I guess it's okay to be
> bug-compatible to Linux, since after all, we are trying to emulate Linux
> more than POSIX.

SUSv3(*) says:

  [EISDIR]
    The named file is a directory and oflag includes O_WRONLY or O_RDWR.
  [ENOENT]
    O_CREAT is not set and the named file does not exist; or O_CREAT is
    set and either the path prefix does not exist or the path argument
    points to an empty string.

Given these descriptions, I can't see anything wrong with that Linux
behaviour.


Corinna

(*) http://www.opengroup.org/onlinepubs/009695399/functions/open.html

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

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

