Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!warwick From: warwick@batserver.cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st.tech Subject: Re: Can my program find its name? Keywords: tech Message-ID: <7321@uqcspe.cs.uq.oz.au> Date: 17 Feb 91 22:37:14 GMT References: <2133022@nuthaus.UUCP> Sender: news@uqcspe.cs.uq.oz.au Reply-To: warwick@batserver.cs.uq.oz.au Lines: 18 In <2133022@nuthaus.UUCP> nut@nuthaus.UUCP (Adam G. Tilghman) writes: > I am writing a program which needs to find out its own name - >I know this is possible, but how is it done? The only way that >I can think of is back-tracing into the parent program to find the >Pexec() parameters, but this doesn't ring very kosher to me :-) >Is there a better way? The shell_read() call returns the info you are looking for. Watch out though. Apparently, some Shells (command line interpreters) do not set things up properly - it will definately work from the desktop though. -- _ |\ warwick@batserver.cs.uq.oz.au / `-' * <-- Computer Science Department, \__--_/ University of Queensland, V AUSTRALIA.