User since: |
Jul 06, 2000 at 17:57 UTC
(21 years ago) |
Last here: |
Jun 15, 2001 at 22:17 UTC
(20 years ago) |
Experience: |
217
|
Level: |
Beadle (5)
|
Writeups: |
18
|
Location: | n/a |
User's localtime: |
Jan 26, 2021 at 23:11 -05
|
Scratchpad: |
None.
|
For this user: | Search nodes |
|
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...
|