my $sleep = 1; $SIG{ALRM} = sub { $sleep = 0; }; $SIG{CHLD} = sub { ... child ends here ... }; ... if (... $pid == 0) { ... child here } else { $sleep = 1; alarm (1); wait_for_signal while $sleep; # search for POSIX, SigAction, ... }
In reply to Re^2: fork() doesn't care about my sleep()?
by happy.barney
in thread fork() doesn't care about my sleep()?
by ap0calypse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |