Perl Monk, Perl Meditation | |
PerlMonks |
Re: Keep a "system" process running if script is prematurely exited?by sflitman (Hermit) |
on Jun 17, 2010 at 05:44 UTC ( [id://845145]=note: print w/replies, xml ) | Need Help?? |
Under bash, you can use the disown command to detach it from the process and make it owned by the top-level process init.
From bash:
Where $! is the last process id. To do this in Perl, I tried this: It starts gedit in its own window on my Ubuntu system and returns to the shell prompt. Then I close the terminal, and voila! gedit is still running. Can anyone tell us why disown is not needed in this case?
HTH,
In Section
Seekers of Perl Wisdom
|
|