my $ch = Proc::Background->new(@command); if (defined $ch->pid()) { my $pid = fork(); if (not defined $pid) { die "Cannot fork: $!"; } elsif ($pid == 0) { # child process my $exitcode = $ch->wait() << 8; if ($exitcode == 0) { # call URL } } else { # parent process #waitpid($kidpid, 0); <- do not wait for child exit 0; } } else { # failed to execute exit 127; }