* process management path retrieve
@ 2003-04-02 15:14 Vincenzo Conti
2003-04-02 15:37 ` Andrew Duane USG
0 siblings, 1 reply; 2+ messages in thread
From: Vincenzo Conti @ 2003-04-02 15:14 UTC (permalink / raw)
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.
That is I execute ./proof.sh --> from ps command I retrieve that
command. I need to know the absolute path of proof.sh.
I tried using what it is shown in proc(4) man, using PIOCPSINFO and
prpsinfo struct but I cannot retrieve this information.
Could you help me ? Any suggestions ?
Thank you very much.
Vincenzo Conti
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: process management path retrieve
2003-04-02 15:14 process management path retrieve Vincenzo Conti
@ 2003-04-02 15:37 ` Andrew Duane USG
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Duane USG @ 2003-04-02 15:37 UTC (permalink / raw)
In article <f5eb69e2.0304020714.6d1da423@posting.google.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-02 15:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-02 15:14 process management path retrieve Vincenzo Conti
2003-04-02 15:37 ` Andrew Duane USG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox