On Wed, Nov 06, 2002 at 11:27:13AM +1100, Peter Rundle wrote: > Coding a 'C' routine I need to know at execute time, the > full path that the program is being executed from.
It it's not known at execution time or compilation time, but IS known at installation time, then you might want to edit the binary postinstall (MIGHT I said :-) http://www.bell-labs.com/project/nsbd/breloc.html > In shell this is in $0 and is expanded at runtime even if > the program is found via the $PATH variable, I.e Not true, as others have noted. Matt PS. But see Andrew Bennetts mail for a better answer :-) -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
