RE: breaking out of accept loop in perl?

Jim Boutcher (jimb@novia.net)
Thu, 22 May 1997 07:27:53 -0500

Message-Id: <01BC6682.8774ED60@208-149-120-37.novia.net>
From: Jim Boutcher <jimb@novia.net>
To: "'Jonathan Roy'" <roy@atlantic.net>,
Subject: RE: breaking out of accept loop in perl?
Date: Thu, 22 May 1997 07:27:53 -0500

You can make it more structured (IMHO) and easier to follow if you just do something like...

int getout=0;
while(FCGI::accept() >= 0 && !getout) {}

Just my style and opinion, I guess..

-----Original Message-----
From:	Jonathan Roy [SMTP:roy@atlantic.net]
Sent:	Wednesday, May 21, 1997 10:17 PM
To:	philr@peoplelink.com; FastCGI Developers List
Subject:	Re: breaking out of accept loop in perl?


  I do something like this:

$mycount = 0;

while(FCGI::accept() >= 0) {
     $mycount++ > 300 and last;
}

FCGI::finish();
exit();

  So that it will reload the control files now and then to catch changes.

-Jonathan

At 05:33 PM 5/21/97 -0700, G. Philip Reger wrote:
>How does one break out of the
>
>while (FCGI::accept() >= 0) {
>	...
>}
>
>loop? I've tried FCGI::finish() and FCGI:finish() and then break, but
>neither seems to work. I don't want to call exit() because that would
>cause my code to completely terminate, right?
>
>help!
>
>phil
>-- 
>G. Philip Reger
>Mgr. Systems Operations
>PeopleLink, Inc. - Connect. Communicate. Simply.
>
>

--
Jonathan Roy - roy@idle.com -- Idle Communications, Inc.
Mail rhoefer@cdmag.com to advertise with the Games Domain! 
http://www.gamesdomain.com/ or http://www.gamesdomain.co.uk/