#!/bin/perl -w my $pid = fork(); if ($pid) { print "PARENT --" . "\n"; waitpid(-1, 0) ; print "-- PARENT " . "\n"; } elsif ( $pid == 0 ) { print "CHILD --" . "\n"; exit; } print "PID - $pid , MAIN PRG --" . "\n";
In reply to Re: fork - child executes code outside of block
by tybalt89
in thread fork - child executes code outside of block
by cyadav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |