Path: utzoo!attcan!uunet!husc6!think!ames!amdahl!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: Finding where an executable was run from -- a proposal. Message-ID: <975@cresswell.quintus.UUCP> Date: 14 May 88 09:21:41 GMT References: <4527@hoptoad.uucp> <1854@mhres.mh.nl> Organization: Quintus Computer Systems, Mountain View, CA Lines: 13 In article <1854@mhres.mh.nl>, jv@mhres.mh.nl (Johan Vromans) writes: > From article <4527@hoptoad.uucp>, by gnu@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.}