Re: Forking question

2012-08-10 Thread David Christensen
On 08/10/12 02:10, G M wrote: 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? "Network Programming with Perl" by Lincoln D.

Re: Forking question

2012-08-10 Thread pangj
> > 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? > Or use a server framework like POE which manages forking for y

Re: Forking question

2012-08-10 Thread Shlomi Fish
Hi Graeme, On Fri, 10 Aug 2012 10:10:10 +0100 G M 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?

Forking question

2012-08-10 Thread G M
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? Thanks in advance, Graeme

Re: Forking question.

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 18:21:16 GMT, David wrote: > another thing: >> while ( $#server_list > -1 ) { > > this might never be true. It's true for as long as there are elements in @server_list. It's equivalent to the (imho more readable) while (@server_list) { # do stuff

Re: Forking question.

2002-08-26 Thread david
David wrote: > another thing: >> while ( $#server_list > -1 ) { > > this might never be true. i cut and paste too much! please ignore that! david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Forking question.

2002-08-26 Thread david
you have: > my $child_limit = 1; > my $child_pids = 0; > $SIG{CHLD} = \&CHILD_COUNT($child_limit); the $child_limit thingy is ignored by Perl. this means when Perl calls your CHIL_COUNT subroutine, the value of the variable $child_limit is not passed in to your subroutine. and then in the CHIL

Re: Forking question.

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 14:15:02 GMT, [EMAIL PROTECTED] (Chad Kellerman) wrote: > I have been trying to work on a script that does forking. > But the script dies in the fork. Here is what I have: > [...] > my $child_limit = 1; > my $child_pids = 0; > $SIG{CHLD} = \&CHILD_COUNT($child_limit); Yo

Forking question.

2002-08-26 Thread Chad Kellerman
Good morning, afternoon, night, I have been trying to work on a script that does forking. But the script dies in the fork. Here is what I have: I push some information about a server into an array. use POSIX "sys_wait_h"; my $child_limit = 1; my $child_pids = 0; $SIG{CHLD} = \&CHILD_