Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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); }

Replies are listed 'Best First'.
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-06-26 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (328 votes). Check out past polls.