|
System Information:
This is perl, v5.6.0 built for i686-linux
Source:
use strict; use warnings; $SIG{CHLD} = sub { print "caught a falling star...\n"; wait(); }; my ($child); if ( $child = fork ) { print "parent of $child, waiting for child...\n"; wait(); } else { exit; }
Output:
parent of 29639, waiting for child... parent of 29639, waiting for child... caught a falling star...