Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: sending signal to forked process

by kiruthika.bkite (Scribe)
on Apr 07, 2010 at 13:18 UTC ( #833292=note: print w/ replies, xml ) Need Help??


in reply to sending signal to forked process

Is this you are expecting,

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); }


Comment on Re: sending signal to forked process
Download Code
Re^2: sending signal to forked process
by ajeet@perl (Acolyte) on Apr 07, 2010 at 14:17 UTC
    Thanks...i got it solved :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://833292]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2014-09-16 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (24 votes), past polls