The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
123456789101112131415 use warnings;use strict;my $pid1 = fork();if ($pid1 == 0) { print "fork 1\n"; sleep 1000;}my $pid2 = fork();if ($pid2 == 0) { print "fork 2\n"; sleep 1000;}waitpid $pid1, 0;waitpid $pid2, 0;
use
warnings;
strict;
my
$pid1
=
fork
();
if
(
== 0) {
print
"fork 1\n"
;
sleep
1000;
}
$pid2
"fork 2\n"
waitpid
, 0;