|more useful options|
Detachment problmby baxy77bax (Chaplain)
|on May 27, 2012 at 08:23 UTC||Need Help??|
baxy77bax has asked for the
wisdom of the Perl Monks concerning the following question:
I need an advice regarding a particular problem.
Couple of years ago i have been working on a program that starts other programs.The way that i tackled with the problem back then was , and i believe still is a bit wonky and now it bit me in the a... So what was the problem:
I have a main program that starts other programs given some other input let just treat this input as time . so on every full hour the main program will start some other program. Once the program is started the given process has to be detached from the main. The way i did this back then was :
Now the reason i did it this way was because it was necessary to kill all running programs once the main program stops running. However though this worked for a while, recently with the new Rocks OS some background processes do not end when the main program is terminated. So what i am looking for is an alternative to the above described procedure. Something stable. Perfect solution would be that i have a complete control over my background processes in a way that once i detached the process, i can get its pid. With this information i could manually check if a specific process is still running or not and if it is, then kill it.
Any ideas ??