You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/local/bin/perl
|
|
|
|
$procid = fork();
|
|
if ($procid == 0) {
|
|
# this is the child process
|
|
print ("this line is printed first\n");
|
|
exit(0);
|
|
} else {
|
|
# this is the parent process
|
|
waitpid ($procid, 0);
|
|
print ("this line is printed last\n");
|
|
} |