Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: sending signal to forked process

by kiruthika.bkite (Scribe)
on Apr 07, 2010 at 13:18 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://833292]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found