[bf1942] Map change process leak with 1.6rc2

AthlonRob AthlonRob at axpr.net
Mon Feb 9 14:57:49 EST 2004


On Mon, 2004-02-09 at 08:15, Paul Bowsher wrote:
> We (me and Steve) *do* use Unix servers (BSD5.1/5.2 w/ Deb compat), and we
> also use Cygwin on any Win32 servers we have. I don't know where you got the
> idea that we use Windows for our BF servers. If we do, we simply use BBO,
> and that's only in special cases

Looking back at the original email Steve sent, he said he was having the
problem with the Linux server, but the problem also broke his Win32
looping batch file, so I went off trying to fix both at once...  :-)

Anyway... if the primary issue is with Linux... or that's the only one
you care about, any inherent reliability issues should be lost.

If the command line changes for the different servers running on the
same host, you'll have a seperate controlling script already for each
server, right?  You're relying on moving to the next line of your bash
file to determine if the server is alive or dead... when it is alive,
the next line never comes.  When it is dead, the line does come.

Let's say you're running your A instance with (and I'm pulling this
syntax out of my ass, I'm sure it is not correct) "./bf1942_lnxded +port
12345" ... ok?  The second one with +port 23456.

For the first one's script, you should be able to replace the line:

./bf1942_lnxded +port 12345

...with...

./bf1942_lnxded +port 12345
while (ps ax | grep "bf1942_lnxded +port 12345"); do
   sleep 5
done

See?  Bash goes on down the line until it hits where it calls the
server.  It calls the server.  The server runs the first map.  As it is
loading the second map, it tells bash it doesn't need the console
anymore, so bash moves on to the next line.  The next line checks to see
if the server is running.  If it is running, it sleeps for five seconds
then checks to see if it is running again.  If it is, it sleeps for five
seconds then checks to see if it is running again.  If it is, it sleeps
for five seconds then checks to see if it is running again... if at any
time it checks and the server is *not* running, then it moves on to the
next line (which I'm going to guess is where y'all send email
notification of a dead server, record stats about it, then you hit done
which starts your while loop [I'm sure y'all aren't actually using
GOTOs] again, which calls the server again, etc)...

Yeah, this is different than my earlier while loop... I think it makes
more sense.  You could grep out the zombied processes to be sure, too...

Rob




More information about the Bf1942 mailing list