use CGI ':standard'; my $pid = fork; if ($pid == 0) { # we are the child close; # close all filehandles so server won't try to stay open exec 'backupprogram' or exit ; # transfer execution } elsif ($pid) { # we are the original process print header, start_html, 'Backup initiated. You can close this window at any time', end_html; } else { die "Fork failed: $!\n"; } # something went wrong