my $pid; sub handler { if($pid==0) { print "sig",shift,"received\n"; } else { $SIG{'INT'}='DEFAULT'; } } $SIG{'INT'}=\&handler; $pid=fork(); if($pid==0) { print "child\n"; sleep(10); } else { wait(); print "parent\n"; sleep(30); }
In reply to Re: sending signal to forked process
by kiruthika.bkite
in thread sending signal to forked process
by ajeet@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |