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

Root Boy Jim rbj at icst-cmr.arpa
Wed May 25 04:12:26 AEST 1988


   From: "David Korn[eww]" <dgk at ulysses.homer.nj.att.com>

   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.

   David Korn
   ulysses!dgk

Everyone won't, especially the hackers who want to fake it out.

BTW, if you are interested in how to make ksh portable, take a look at
how GNU emacs is done. I didn't say it was pretty, but using cpp to
build a makefile for you might be a win.

	(Root Boy) Jim Cottrell	<rbj at icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
	The opinions expressed are solely my own
	and do not reflect NBS policy or agreement
	My name is in /usr/dict/words. Is yours?



More information about the Comp.unix.wizards mailing list