http://www.perlmonks.org?node_id=845145


in reply to Keep a "system" process running if script is prematurely exited?

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:
# gedit & # disown $!
Where $! is the last process id. To do this in Perl, I tried this:
# perl -e 'system q{gedit &}'
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,
SSF