delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/26/16:31:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <430F7BD7.5000406@byu.net>
Date: Fri, 26 Aug 2005 14:30:15 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problem with sh/bash and snapshot cygwin1-20050825.dll
References: <430E9B0B DOT 8040303 AT scytek DOT de> <20050826052618 DOT GC4087 AT trixie DOT casa DOT cgf DOT cx> <20050826090717 DOT GB21203 AT calimero DOT vinschen DOT de> <430F0849 DOT 8040002 AT byu DOT net> <20050826123244 DOT GA23422 AT calimero DOT vinschen DOT de>
In-Reply-To: <20050826123244.GA23422@calimero.vinschen.de>
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for your cleanup efforts!  20050826 is much better.  All that
remains is the regression from 1.5.18, where readlink(NULL, buf) set
buf[0], but now it doesn't.

According to Corinna Vinschen on 8/26/2005 6:32 AM:
>>Also, readlink("linktofile/x", buf) is now failing (good), but with
>>ENOENT, instead of the proper ENOTDIR.
> 
> That's not true.  I just checked it again.  Besides that, I wasn't
> finished with realpath anyway.

I narrowed down where the bug was in my previous report, and it is still
buggy:

$ readlink u
x
$ ls x*
x.exe
$ ls -lF x
- -rwxr-xr-x  1 eblake None 13961 Mar 10 06:54 x*
$ file x    # See below for more on this...
x: writable, executable, regular file, no read permission
$ ./myreadlink u/blah
'u/blah': NULL, 2 No such file or directory

You are right that the code is correctly giving ENOTDIR when the symlink
isn't half-dangling (ie stat() succeeds but open() fails):
$ readlink u.exe
x.exe
$ ./myreadlink u/blah
'u/blah': NULL, 20 Not a directory

Meanwhile, it points out a bug in file(1); it needs some .exe magic to
avoid misdiagnosing files when you leave off the .exe!
$ file x.exe
x.exe: PE executable for MS Windows (console) Intel 80386 32-bit

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDD3vX84KuGfSFAYARAqu1AKDFbrv9ZlnqDIE+s8aKNuWs7UVyYQCguPge
2W4gUJDN/2yGbiv630Cz5mA=
=DyF5
-----END PGP SIGNATURE-----

--
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/

- Raw text -


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