This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /proc/<pid>/exe points to void


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.


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]