Finding where an executable was run from -- a proposal.
Pete Holsberg
pjh at mccc.UUCP
Thu May 26 00:52:45 AEST 1988
In article <10310 at ulysses.homer.nj.att.com> dgk at ulysses.homer.nj.att.com (David Korn[eww]) writes:
...
...ksh passes the full pathname of the executable as the first environment
...variable and names it _. Thus, if the program is run by ksh,
...genenv("_"); returns a pathname for the executable. Now if everyone
...would follow this convention the problem would be solved.
Aspen Technology's implementation of ksh sets _ to just the name of the
executable. (At least, that is what is stored in _ in the environment space.)
More information about the Comp.unix.wizards
mailing list