> 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 -> /bin/ls
$ readlink /proc/self/exe
/bin/readlink
$ perl -le 'print readlink "/proc/self/exe"'
/home/usr/local/bin/perlmacs

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

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

-- 
John Tobey, late nite hacker <[EMAIL PROTECTED]>
\\\                                                               ///
]]]             With enough bugs, all eyes are shallow.           [[[
///                                                               \\\

Reply via email to