Finding where an executable was run from -- a proposal.

Richard A. O'Keefe ok at quintus.UUCP
Sat May 14 19:21:41 AEST 1988


In article <1854 at mhres.mh.nl>, jv at mhres.mh.nl (Johan Vromans) writes:
> From article <4527 at hoptoad.uucp>, by gnu at hoptoad.uucp (John Gilmore):
> > If anyone implements this, I recommend providing a #define AV_EXECNAME -1
> > and documenting that argv[AV_EXECNAME] is the pathname given to exec().
> 
> I'm already using the convention that library/data files belonging to a
> program are located in a path relative to the name of the program.

And what does this scheme do when someone makes a hard link to your 
program and invokes it via that hard link?  {In particular, if you are a
nice person and make lots of utilities available, someone might want
access to only one of them, and might prefer to stick with System V/
Bourne shell methods, ruling out symbolic links and aliases.}



More information about the Comp.unix.wizards mailing list