Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-07-2010 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 11
kill 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.
- 03-08-2010 #2
From a shell or script
ps -A
lists all processes.
ps h -opid -C metlab
should find the metlab process PID
ps h -opid -C metlab | xargs kill
should kill the process


Reply With Quote
