in reply to Re: fork() doesn't care about my sleep()?
in thread fork() doesn't care about my sleep()?

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, ... }