in reply to CGI fork() Difficulty

Try doing a "double-fork" to detach the long-running process from the Web server. Something like:
if (my $pid1 = fork()) { wait; return; } elsif (defined($pid1)) { # Child if (my $pid2 = fork()) { # Still Child exit(0); } elsif (defined($pid2)) { # Grandchild exec(...); } else { die "Fork error: $!\n"; } } else { die "Fork error: $!\n"; }

You may also want to do things like POSIX::setsid and setpgrp. Search the archives for daemon for some sample code.