LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 01-14-2005, 08:55 PM   #1
iclinux
Member
 
Registered: Dec 2004
Posts: 69

Rep: Reputation: 15
monitor process


I have to implement a program A that can prevent process B from being killed. And I can kill B with A by passing A some command...
BTW, Both A and B are background application.

I don't know how to do it.

Regards.
 
Old 01-15-2005, 12:46 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Moved: This thread is more suitable in the Programming Forum and has been moved accordingly to help your thread/question get the exposure it deserves.

Last edited by Capt_Caveman; 01-15-2005 at 12:48 PM.
 
Old 01-15-2005, 06:28 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
I don't believe you can prevent a process from being killed because there are many ways to kill a process and sometimes it could just hang. However, you can check that if the process is killed (or doesn't exist) then restart it. You can check by ways of from running a 'ps' output or if the process opens up a port. To kill the process, use the 'kill' command.

If you are asking how to write this, do a google search on "bash scripting" and learn how bash works.

-twantrd
 
Old 01-16-2005, 02:00 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread



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
Process monitor $@ya Programming 5 09-15-2005 11:57 AM
can inetd monitor process? iclinux Linux - Newbie 0 01-27-2005 06:49 PM
process monitor iclinux Programming 6 01-14-2005 09:35 PM
Process monitor in program ... joda Linux - Networking 1 06-10-2004 01:22 PM
How do I monitor a process? mad_ady Linux - General 5 11-07-2003 09:15 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration