open FILE, " 2>&1 1>/dev/null" or exec(); die $!; #### sub sigtrap() { if(defined($pid) && ! ($pid == 0)){ killfam 'TERM', ($pid); } print "\n"; exit(1) } $pid = fork(); if($pid == 0){ #print "DEBUG - I am the child pid : $$ \n"; qx/my command running in background 2>&1 1>\/dev\/null/; sleep 10; exit(0); } sleep 15; #use the command's output file to get the results