Hi Graeme,

On Fri, 10 Aug 2012 10:10:10 +0100
G M <iamnotregiste...@hotmail.com> wrote:

> 
> Hi,
> 
> I'm working on a forking process and I need a way to check if any of
> the processes have failed and if they have restart them.  Can anyone
> point me in the right direction to a tutorial or explanation of how
> to do this?

How do you expect to know when a process has "failed"? Will it die in this
case? If so, you'll receive a SIGCHLD signal and can trap it and handle it
appropriately. There's some rudimentary coverage of that on 
http://perldoc.perl.org/perlipc.html (though I can warn you that the perl code 
is
no longer considered idiomatic - see 
http://perl-begin.org/tutorials/bad-elements/ ),
and you may also wish to look at 
https://metacpan.org/module/Parallel::ForkManager for
a useful wrapper over the nitty-gritty details.

If that's not what you want, then you'll have to explain.

Regards,

        Shlomi Fish

> 
> 
> Thanks in advance,
> 
> Graeme
>                                         


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What Makes Software Apps High Quality -  http://shlom.in/sw-quality

The KGB used to torture their victims by having them look at scrolling XSLT
code.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to