LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-07-2010, 02:30 PM   #1
Marin_
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
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.
 
Old 03-07-2010, 03:14 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,631

Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
Does Matlab leave a PID file in a known place?
 
Old 03-07-2010, 03:28 PM   #3
Marin_
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
Does Matlab leave a PID file in a known place?
I dont know
 
Old 03-07-2010, 10:22 PM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
Quote:
Originally Posted by Marin_ View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
about pid of process hamedn Programming 2 01-27-2010 05:21 PM
how to get the name of process from PID in C/C++? kulandaivelu Programming 3 02-03-2009 09:41 AM
How to get the PID of the process giving kill signal to a process? hariprd Programming 2 11-27-2008 03:10 AM
pid of a process kushkothari Programming 8 11-19-2008 05:06 AM
[C++] Get process ID (PID) Moraxus Programming 5 10-16-2008 12:31 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration