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 )?