Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How do I trap $SIG{INT} ( sigint aka Ctrl^c )?

by LH2007 (Initiate)
on Oct 25, 2007 at 14:40 UTC ( [id://647189]=note: print w/replies, xml ) Need Help??


in reply to How do I trap $SIG{INT} ( sigint aka Ctrl^c )?

How to terminate a childprocess by press Ctrl_c: Creat 2 process,P1(parent),P2(child).P1 gets characters from keyboard.If press Ctrl-C,P1 will send a signal to terminate P2.... I think,I can use a subroutine to response to Ctrl-C combination: code$SIG{INT} = \&killproc; sub tsktsk { $SIG{INT} = \&killproc; ............ } /code Please help me.Thanks

Originally posted as a Categorized Answer.

  • Comment on Re: How do I trap $SIG{INT} ( sigint aka Ctrl^c )?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2026-01-21 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.