#!/usr/bin/perl use POSIX qw(setsid); fork and exit; fork and exit; chdir("/"); setsid; exec @ARGV or die "Couldn't exec @ARGV: $!\n";