0

Program 1 runs irregularly, and crashes program 2, which then crashes program 1.

I'm not able to find the proper way to make program 2 stop when program 1 is initiated, and then restart program 2 when program one quits. I'm tired of having to manually do this, and I have been searching for a solution for the past few hours.

Thanks.

1

a combination of trap and exit in a wrapper script should help ....

like on encountering the process prog2 in ps -ef | grep prog2 , you can use exit in wrapper to send signal to trap - using trap you can specify what action to do like normal exit or force kill ie kill -9 PID_progX !!

wrapper is something like a controling script that will start , stop and monitor the process so that you dont have to start or stop them your self.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.