LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   pid of a process (http://www.linuxquestions.org/questions/linux-software-2/pid-of-a-process-793819/)

Marin_ 03-07-2010 02:30 PM

pid of a process
 
Hi all.

Im working in Suse, and i have a process in C where i use the function "system" to call matlab. I have some problems with matlab, and i need to know how to kill it automatically with another process that is monitoring the matlab.

I think, that the easiest way is with the pid of matlab, and then kill the process by using the pid.

How can i know the pid of matlab, in another process and then kill it? (I have to do this, automatically, running another process)

Thanks for help.

AlucardZero 03-07-2010 03:14 PM

Does Matlab leave a PID file in a known place?

Marin_ 03-07-2010 03:28 PM

Quote:

Originally Posted by AlucardZero (Post 3889470)
Does Matlab leave a PID file in a known place?

I dont know

Sayan Acharjee 03-07-2010 10:22 PM

Quote:

Originally Posted by Marin_ (Post 3889442)
Hi all.

Im working in Suse, and i have a process in C where i use the function "system" to call matlab. I have some problems with matlab, and i need to know how to kill it automatically with another process that is monitoring the matlab.

I think, that the easiest way is with the pid of matlab, and then kill the process by using the pid.

How can i know the pid of matlab, in another process and then kill it? (I have to do this, automatically, running another process)

Thanks for help.

Use this:
#pidof matlab


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