Ahhh, sorry I didn't say, this would be on a Linux system. Marty
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > tripix > Sent: Wednesday 10 April 2002 12:58 > To: Martin Moss; Perl-Win32-Users (E-mail) > Cc: Perl-Unix-Users > Subject: [Perl-unix-users] Re: Hard Total amount of Forks > > > try using perldoc Win32::Semaphore, it should help considerably. > > > > ----- Original Message ----- > From: "Martin Moss" <[EMAIL PROTECTED]> > To: "Perl-Win32-Users (E-mail)" > <[EMAIL PROTECTED]> > Cc: "Perl-Unix-Users" <[EMAIL PROTECTED]> > Sent: Wednesday, April 10, 2002 12:13 PM > Subject: Hard Total amount of Forks > > > > All, > > > > I wish to add forking to a script I wrote. > > However I wish to ensure that only a configurable number of > 'children' are > > created. > > > > forking is no problem, > > Queuing up things to be forked I can do, > > > > However is there an easy way to create a hard total, I was thinking the > only > > way is to have each fork write it's pid to a file, and delete it when it > > dies, and the main parent simply counts the number of pid files in a > > directory. if The Number is reached the parent may check with a > kill=>1 on > > each pid file just to check for non existing processes or possibly > kill -9'd > > processes. > > > > Or can I do it all in memory and have the parent control, maybe using > > signals? > > > > Has anybody done something simillar, can anybody suggest other methods? > > > > Marty > > > > _______________________________________________ > > Perl-Win32-Users mailing list > > [EMAIL PROTECTED] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > _______________________________________________ > Perl-Unix-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs