LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   monitor process (https://www.linuxquestions.org/questions/programming-9/monitor-process-277932/)

iclinux 01-14-2005 08:55 PM

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.

Capt_Caveman 01-15-2005 12:46 PM

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.

twantrd 01-15-2005 06:28 PM

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

acid_kewpie 01-16-2005 02:00 PM

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


All times are GMT -5. The time now is 02:44 AM.