LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   how to get the name of process from PID in C/C++? (http://www.linuxquestions.org/questions/programming-9/how-to-get-the-name-of-process-from-pid-in-c-c-700955/)

kulandaivelu 01-30-2009 12:46 AM

how to get the name of process from PID in C/C++?
 
hi,
Can anyone help me to find out name of the process from process ID in C/C++ program?

Thanks in Advance
Kulandaivelu.S

irey 01-30-2009 04:25 AM

Take a look at /proc/<pid>/exe. It's a symlink to the binary that created the process.

kulandaivelu 02-02-2009 11:23 AM

Hi irey,

Thanks for reply..

sundialsvcs 02-03-2009 09:41 AM

Tell your teacher hello for me.


All times are GMT -5. The time now is 09:11 AM.