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:
$SIG{INT} = \&killproc;
sub killproc {
$SIG{INT} = \&killproc;
............ }
Please help me how to terminate a process by press Ctrl-C.Thanks