sandra@utah-cs.UUCP (03/12/87)
Is there any way I can find out the name of the program being executed? What I would really like is a pathname, so I can make MicroGNUEmacs look for a startup file in the same place as where the executable lives. I seem to remember this question being asked before, but I don't remember if there was an answer.... -Sandra (utah-cs!sandra or sandra@cs.utah.edu)
wheels@mks.UUCP (03/12/87)
In article <4374@utah-cs.UUCP>, sandra@utah-cs.UUCP (Sandra J Loosemore) writes: > What I would really like is a pathname, so I can make MicroGNUEmacs look > for a startup file in the same place as where the executable lives. > > -Sandra > (utah-cs!sandra or sandra@cs.utah.edu) This problem also exists in the MS-DOS world. How should a program determine where to look to find other parts of itself (overlays, resource files, etc.). One solution is to have the program use the PATH environment variable, and look in all those places. Can anyone tell me if TOS has environment variables? Are they set when using GEM, or only when using a shell? Another solution is to load a resident program which intercepts all opens and does its own searching. This is available for MS-DOS, but I don't know the details of its inner works. If neither of these is available, TOS programs may just have to look in a few predetermined places (/, /bin, /auto, etc.). I hope something else can be done. -- Gerry Wheeler {seismo,decvax,ihnp4}!watmath!mks!wheels Mortice Kern Systems Inc.