delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/18/13:10:47

X-Spam-Check-By: sourceware.org
Date: Wed, 18 Jan 2006 19:10:27 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: cygwin-1.5.19-1
Message-ID: <20060118181027.GA17787@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <announce DOT 20060117033619 DOT GA12055 AT coe DOT casa DOT cgf DOT cx> <u1wz5h2ed DOT fsf AT gnu DOT org>
Mime-Version: 1.0
In-Reply-To: <u1wz5h2ed.fsf@gnu.org>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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 Jan 18 12:27, Sam Steingold wrote:
> > * Christopher Faylor <pts-ab-crefbany-ercyl-cyrnfr AT pltjva DOT pbz> [2006-01-16 22:36:19 -0500]:
> >
> > corinna: Emulate linux version of realpath
> 
> now when I have a file "foo.exe",
> realpath("foo") returns "foo" instead of "foo.exe"
> also:
> $ ls -l /proc/self/exe
> 0 lrwxrwxrwx 1 sds mkgroup-l-d 0 Jan 18  2006 /proc/self/exe -> /usr/bin/ls*
> 
> instead of ls.exe, so /proc/self/exe cannot be open() for input.
> 
> so, now I must add the "exe" suffix myself?!

Funny that you mention it.  The realpath change to "emulate linux"
has nothing to do with what you're talking about.  The "emulate linux"
change is something about how to behave if the second argument is a
NULL pointer.  Linux returns a malloced buffer in this case, which
Cygwin didn't so far.

Now, talking about the .exe suffix... the realpath change is this:

  Before: realpath("foo", ...) = NULL (ENOENT)
  After:  realpath("foo", ...) = "foo".

So, instead of returning ENOENT it returns a path that the file exists
which is equivalent to how stat behaves, which it wasn't before.

The only problem is that this change was already applied on 2005-01-25,
which means this is in Cygwin since release 1.5.13 (2005-03-01).

As for removing the .exe from /proc/$PID/exe(name), AFAICS this hasn't
changed since at least 2004-01-01, which was the date when I gave up
looking for a change in the code.

So, well, I don't see why you "now" would have to change something
exactly in relation to this.


Corinna

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

- Raw text -


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