I'm not really clear on what you want to do. The basic usage of fork is as follows:
if (my $child = fork()) { # in parent while (! -f "output.txt") { print "Waiting for output.txt\n"; sleep 10; }; print "Found output.txt, continuing\n"; } else { # In child, just run p2 exec 'p2'; # exit }; # do more stuff print "Waiting for child to finish\n"; wait $child;
In reply to Re: Split process->check ->and run Parallel
by Corion
in thread Split process->check ->and run Parallel
by Noame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |