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/bin/perl
|
|
use warnings;
|
|
use strict;
|
|
my $f = fork; # Program splits in two here
|
|
if (defined $f) {
|
|
if ($f == 0) {
|
|
print "This is the child process\n";
|
|
exit;
|
|
} else {
|
|
print "This is the parent process\n";
|
|
exit;
|
|
}
|
|
} else {
|
|
print "Your system doesn't support fork!\n";
|
|
}
|