in reply to How do I get the process ID from a system("x &") call?
print "About to fork:\n"; my $pid = fork(); if ($pid ==0) { exec "sleep 5"; exit(0); } else { print "Child PID: $pid\n"; } print "Parent continuing...\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I get the process ID from a system("x &") call?
by zakzebrowski (Curate) on Sep 19, 2002 at 18:08 UTC |