process name from process id

R. Kannan kannan at cerc.wvu.wvnet.edu
Thu Jun 22 03:35:24 AEST 1989


The main objective is to get the program file name that resulted
in the process.

I have the pid for a process. I want to find out the name of
the program file that resulted in that process.


some_unknown_function ( getpid () ) => should return the name of the program
file that resulted int he calling process.

Thank you.

I want soemthing better than "ps | grep getpid ()" route. Direct callable
function. 

--kannan



More information about the Comp.unix.questions mailing list