From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2b469b7662ecf580 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-04-02 07:37:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: process management path retrieve References: Organization: DEC ... um ... Digital Equipment ... um ... Compaq ... um ... HP? From: duane@wasted.zk3.dec.com (Andrew Duane USG) Message-ID: Date: Wed, 02 Apr 2003 15:37:17 GMT NNTP-Posting-Host: 16.140.32.3 X-Complaints-To: abuse@HP.com X-Trace: news.cpqcorp.net 1049297837 16.140.32.3 (Wed, 02 Apr 2003 07:37:17 PST) NNTP-Posting-Date: Wed, 02 Apr 2003 07:37:17 PST Xref: archiver1.google.com comp.unix.tru64:9787 In article conti@openaccess.it (Vincenzo Conti) writes: >>From a process pid I have to retrieve command with absolute path that >creates that process. >>From ps command I can retrieve the command but if it was executed with >relative path, I retrieve it in that format. I do not believe there is any way to get the full path name of the executable if you invoke it by relative pathname. The best you could probably do in the "./name" case is also get the cwd and put them together to make a full pathname. But if the program was found in the shell's search path, you are pretty much out of luck. -- Andrew L. Duane (JOT-7) duane@zk3.dec.com HP/Compaq Corporation Andrew.Duane@compaq.com 110 Spit Brook Road Andrew.Duane@hp.com M/S ZKO3-3/U14 Nashua, NH 03062-2698 (603)-884-1294