This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: /proc/<pid>/exe points to void
- From: Sam Steingold <sds at gnu dot org>
- To: cygwin at cygwin dot com
- Date: Fri, 20 Jan 2006 13:50:05 -0500
- Subject: Re: /proc/<pid>/exe points to void
- References: <uhdjjkyi2.fsf@gnu.org> <20050310220045.GC20798@cygbert.vinschen.de> <u1xamjhtl.fsf@gnu.org> <20050311160956.GB2821@cygbert.vinschen.de>
- Reply-to: sds at gnu dot org
> * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2005-03-11 17:09:56 +0100]:
>
> On Mar 11 10:57, Sam Steingold wrote:
>> > * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2005-03-10 23:00:45 +0100]:
>> >
>> > 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.
--
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.jihadwatch.org http://www.honestreporting.com http://www.dhimmi.com
http://pmw.org.il http://www.openvotingconsortium.org http://ffii.org
There are two ways to write error-free programs; only the third one works.
--
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/