>> cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
>> Date: Wed, 02 Aug 2000 13:58:49 -0600
>> From: Tom Christiansen <[EMAIL PROTECTED]>
>> X-UIDL: ab65e2a94d9487f65465be74c21fe152
>> 
>> >> Insofar as you can pretend to make a good guess at that--perhaps.
>> 
>> >On Linux: /proc/self/exe
>> 
>> What good does that do you?  You can't go ../foo with that.  It doesn't
>> tell you the real name, just the dev,ino.

>Here:

>$ ls -l /proc/self/exe
>lrwx------    1 jtobey   jtobey          0 Aug  2 16:06 /proc/self/exe -<SNIP>
>$ readlink /proc/self/exe
>/bin/readlink
>$ perl -le 'print readlink "/proc/self/exe"'
>/home/usr/local/bin/perlmacs

Untrustworthy: trivial race condition there, eh?

>>  And it's a nonportable answer
>> that cannot be reproduced everywhere that Perl runs.

>Touche.  I believe Windows' GetModuleFileName will work.  Any others?

Just the umptimillion other operating systems Perl runs on.  You cannot
use this.  You can just sometimes guess, non-securely.

--tom

Reply via email to