$SIG{CHLD} = "IGNORE"; while ( program_should_be_running() ) { # Might want a sleep or a usleep (from Time::HiRes) here. if ( my $pid = fork ) { # Do nothing...? This is the "permanent" parent process. # $pid is the child $$ } else { run_your_sub(); # Processes could stack up fast. } }