solaris: finding program name

solaris: finding program name

Post by Sree » Wed, 05 May 2004 22:35:40


Hi,
In Solaris, how can a program find its program name(on-disk) at runtime
when main is declared to have an empty argument list? I can't change
main's declaration.
I guess there is call like getprogname() in some systems.

Thanks,
Sree
 
 
 

solaris: finding program name

Post by Rich Tee » Thu, 06 May 2004 01:06:05


man getexecname

--
Rich Teer, SCNA, SCSA

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.yqcomputer.com/

 
 
 

solaris: finding program name

Post by David Schw » Thu, 06 May 2004 03:47:32


How you find it really depends upon what you want it for. What do you
plan to do with this information?

DS