getprogname / setprogname

H. J. Lu hjl@lucon.org
Fri Mar 17 19:05:00 GMT 2006


On Fri, Mar 17, 2006 at 07:51:37AM -0800, Ulrich Drepper wrote:
> H. J. Lu wrote:
> > Since we are on this topic, sometimes, I want to know the real pathname
> > of the program. It isn't easy to find it out.
> 
> Of course it is: readlink() on /proc/self/exe.
> 

It doesn't work before /proc is mounted.


H.J.



More information about the Libc-alpha mailing list