$pid = $HTTP_SERVER->background; # do other stuff ... # when you want to kill it.. kill 9, $pid;