in reply to Run Perl script from another perl script independently
Usually fork is combined with exec to replace the originating script with some other script (restartCompletenessCheck in your case) in the forked process. Also the return value of fork signals where you are. So that you can do something else in the copy than in the original. You can make sure with a simple if construct that your copy doesn't start the application again
If you use fork/exec for the shutdown and start of your application, you could use applMon directly to monitor the success instead of a separat script restartComplemenessCheck
|
|---|