setsid(); $pid = fork; exit 0 if $pid; exit 1 if not defined $pid;