delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/30/03:29:19

X-Spam-Check-By: sourceware.org
Date: Mon, 30 Jan 2006 00:29:13 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: /proc/<pid>/exe points to void
Message-ID: <20060130082913.GA3528@efn.org>
References: <uhdjjkyi2 DOT fsf AT gnu DOT org> <20050310220045 DOT GC20798 AT cygbert DOT vinschen DOT de> <u1xamjhtl DOT fsf AT gnu DOT org> <20050311160956 DOT GB2821 AT cygbert DOT vinschen DOT de> <ufynid99e DOT fsf AT gnu DOT org> <20060124174528 DOT GA20968 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20060124174528.GA20968@calimero.vinschen.de>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes
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 Tue, Jan 24, 2006 at 06:45:28PM +0100, Corinna Vinschen wrote:
> On Jan 20 13:50, Sam Steingold wrote:
> > >> > On Mar 10 16:00, Sam Steingold wrote:
> > >> >> /proc/<pid>/exe points to "foo", not to "foo.exe", so it cannot be
> > >> >> opened &c.
> > >> >         ^^^^
> > >> > 	????
> > >> 
> > >> how do I find out which file is running if /proc/<pid>/exe cannot be
> > >> opened?
> > >
> > > access(2) or stat(2)
> > 
> > http://www.opengroup.org/onlinepubs/009695399/functions/access.html
> > the above spec of access appears to indicate that if access() succeeds
> > then open() must succeed too.
> > this is not the case in cygwin: /proc/self/exe cannot be open()ed.
> 
> I've just checked in a patch which tacks on the .exe suffix to
> /proc/$PID/exe, as well as a patch to realpath which returns the
> pathname with .exe suffix, even if the original name has no suffix
> given.  We will give this a try.  Please test the next snapshot.

Mostly for the archives, I note that this makes perl's $^X variable
include the ".exe" suffix.  This is probably a good thing, but at the
moment triggers a test failure.

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