=sjs= has asked for the wisdom of the Perl Monks concerning the following question:
I'm having problems understanding how SIG works on UNIX I guess.
I have a script that looks something like:
As far as I can tell, my signal handeler is never called, so I assume the forked process under the system call is getting the signal -- it does exit. How do I get this passed up to the parent?$SIG{INT} = sub {$Abort++}; while (1) { if($Abort) exit(0); system(do something); }
Thanks
Steve S.
Edited by Chady -- added code tags, minor formatting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SIG and system
by Roy Johnson (Monsignor) on Dec 06, 2004 at 18:49 UTC | |
|
Re: SIG and system
by bluto (Curate) on Dec 06, 2004 at 18:53 UTC | |
|
Re: SIG and system
by =sjs= (Initiate) on Dec 06, 2004 at 21:36 UTC |