use strict; my $pid = fork(); if (!$pid) { print "I am the child process\n"; system "emacs"; # this is just an example I am not really launching emacs print "Child process should end now\n"; exit 0; } else { print "I am the parent of $pid\n"; while (kill 0,$pid) { print "My child is still alive\n"; sleep(3); # wait a little bit } print "Parent process done\n"; } __OUTPUT__ $ perl script.pl I am the child process I am the parent of 1324 My child is still alive My child is still alive My child is still alive Child process should end now My child is still alive My child is still alive etc.