rapide has asked for the wisdom of the Perl Monks concerning the following question:
I've made all this work, but every time I send a signal to it to get the current status it kills the current process to give me the information. So do I need to set some parameters or something to make sure children can work unaffected by parents signal status?
This is my code in short:
$SIG{USR1} = \&status; sub status () { $SIG{USR1} = \&status; print "\n Status is: $status"; } foreach $path (@paths) { my $pid = open3(*CMD_IN, *CMD_OUT, *CMD_ERR, $path); $status = $path; waitpid($pid, 0); }
Any suggestions ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Signal to parent-process. Does it affect it's children?
by betterworld (Curate) on Sep 07, 2008 at 17:34 UTC | |
by rapide (Beadle) on Sep 07, 2008 at 18:42 UTC | |
by tilly (Archbishop) on Sep 09, 2008 at 21:45 UTC | |
|
Re: Signal to parent-process. Does it affect it's children?
by shmem (Chancellor) on Sep 07, 2008 at 21:25 UTC | |
by rapide (Beadle) on Sep 07, 2008 at 21:47 UTC | |
by Perlbotics (Archbishop) on Sep 08, 2008 at 21:33 UTC | |
by rapide (Beadle) on Sep 09, 2008 at 15:45 UTC | |
by Perlbotics (Archbishop) on Sep 10, 2008 at 11:56 UTC | |
|