Home > Archive > PERL Beginners > December 2004 > KILL INT can not wake up $SIG{INT}
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
KILL INT can not wake up $SIG{INT}
|
|
| Kelvin Wu 2004-12-20, 3:55 am |
| Hi list,
Anyone has such experience? KILL INT pid cannot wake up $SIG{INT} sub{}.
my code is like;
$SIG{INT} = sub {#load pm}
$SIG{ALRM} = sub {print "Driver $pm is going to sleep... bye.\n"; exit;};
the pm actually has a system call to execute something
sub xxx {
`perl xxx.pl`
}
but
my $tmp = kill "INT", $pid; ## it returns number of processes, eg: 1
cannot wake up the $SIG{INT} at all after $SIG{ALRM} has been executed.
does system call cause the problem?
Thanks.
| |
| mgoland@optonline.net 2004-12-20, 8:56 pm |
|
----- Original Message -----
From: Kelvin Wu <kelvin.wu@gmail.com>
Date: Monday, December 20, 2004 0:36 am
Subject: KILL INT can not wake up $SIG{INT}
> Hi list,
Hello
>
> Anyone has such experience? KILL INT pid cannot wake up $SIG{INT}
> sub{}.
Only on Window's, but then again I don't think signals are a native implementation in WinPerl.
> my code is like;
>
> $SIG{INT} = sub {#load pm}
>
> $SIG{ALRM} = sub {print "Driver $pm is going to sleep... bye.\n";
> exit;};
> the pm actually has a system call to execute something
> sub xxx {
> `perl xxx.pl`
> }
>
> but
>
> my $tmp = kill "INT", $pid; ## it returns number of processes, eg: 1
> cannot wake up the $SIG{INT} at all after $SIG{ALRM} has been
> executed.
Well sure, in example you have provided your entire program will exit after SIGALRM.
> does system call cause the problem?
It shouldn't. Post more of your code if you need more help.
HTH,
mark G.
>
> Thanks.
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
|
|
|
|
|