You are not logged in.
Hi there, I use a program which calls another one, but when I close the first one, the second one is not closed automatically even if not anymore needed, so I have to do it manually.
I tried a classic:
firstprogram
pkill secondprogram
but, of course, this script closes immediately the secondprogram.
So, what I supposed to do?
Thank you in advance!
Last edited by metre (2011-03-24 11:33:01)
Offline
Hard to tell unless you show us some code or at least mention the method used to launch the subprocess. Generally you should wait(3) for your child processes to exit before exiting your parent process, or terminate the child manually when the parent exits, e.g decide yourself when it is "not needed anymore".
Last edited by hbekel (2011-03-24 11:16:11)
Offline
Hard to tell unless you show us some code or at least mention the method used to launch the subprocess. Generally you should wait(3) for your child processes to exit before exiting your parent process, or terminate the child manually when the parent exits, e.g decide yourself when it is "not needed anymore".
thank you, I did it:
firstprogram
wait
pkill secondprogram
it works, woah
Offline