[bf1942] Map change process leak with 1.6rc2
killing at multiplay.co.uk
Sun Feb 8 05:23:13 EST 2004
Don't think you read the post quite fully there rob
The above is a very simple example which does nothing apart
from restart the server on crash but we use a more complex one
which does more, such as email notification and stats.
In other words its just there as a basic example and nothing
to do with the real issue which is that using a looping script
doesn't work due to the way the new process is created on
map change. This results in 1 additional server per map
change running e.g. after 2 map changes you will have 3 bf1942
servers running which is obviously not good.
Steve / K
----- Original Message -----
From: "AthlonRob" <AthlonRob at axpr.net>
To: <bf1942 at icculus.org>
Sent: Sunday, February 08, 2004 3:36 AM
Subject: Re: [bf1942] Map change process leak with 1.6rc2
> On Sat, 2004-02-07 at 09:41, Steven Hartland wrote:
> > On a similar note the win32 dedicated server breaks
> > looping scripts e.g.
> > ===SCRIPT===
> > @echo off
> > :10
> > BF1942_w32ded.exe
> > rem goto 10
> > ===SCRIPT===
> I'd hardly call a batch file a 'script' ... but okay. :-)
> It's been a while since I did anything significant with batch files, but
> as I recall, "rem goto 10" does absolutely nothing. ;-)
> > The above is a very simple example which does nothing apart
> > from restart the server on crash but we use a more complex one
> > which does more, such as email notification and stats. With the
> > new 1.6 this fails, as on map change the original process quits
> > completely leaving a new process with ppid = 0. This makes it
> > look like a server failure the result is that a new server is started
> > on each map change the result being a n - 1 servers running
> > ( n = number of map changes ).
> Well, I don't know how you'd do this on Windows (maybe with some cygwin
> tools?), but in Linux I'd rewrite the above batch file as:
> while (pgrep bf1942 > /dev/null); do
> sleep 2
> ...and work with that to do all the fancy-schmantzy stuff you want to
> do. :-)
> GOTO's are very ugly, BTW.
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137
or return the E.mail to postmaster at multiplay.co.uk.
More information about the Bf1942