Xref: utzoo comp.unix.questions:14407 comp.unix.wizards:16994 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!purdue!haven!h.cs.wvu.wvnet.edu!cerc.wvu.wvnet.edu!kannan From: kannan@cerc.wvu.wvnet.edu (R. Kannan) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: process name from process id Keywords: getpid etc.. Message-ID: <157@cerc.wvu.wvnet.edu.edu> Date: 21 Jun 89 17:35:24 GMT Sender: news@cerc.wvu.wvnet.edu Distribution: usa Lines: 16 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