Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#12346) incorrect saving when quitting too fast
Home

[Freeciv-Dev] (PR#12346) incorrect saving when quitting too fast

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: matzjosh-freeciv@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12346) incorrect saving when quitting too fast
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Aug 2005 19:00:18 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12346 >

> [jdorje - Mon Aug 08 19:28:29 2005]:
> 
> At first I thought it should be fixed with signals.  Send a SIGTERM to
> the server rather than a SIGKILL, and interpret a SIGTERM properly in
> the server (block it during saves, auto-save otherwise).  But this isn't
> really portable since windows uses CloseProcess whose behavior I don't
> know; signals on other platforms may not have consistent behavior.
> 
> The other alternative is to use /quit to kill the server.  Whenever the
> client chooses to disconnect, do a "soft" kill of the server by sending
> /quit instead of a signal to kill it.  This should cause the server to
> quit in its own good time even if this means running a few extra seconds
> to complete a save.  The problem here is sometimes the client doesn't
> choose to disconnect and we have to do a full kill.
> 
> The attached patch is an attempt at the second.  This needs some testing
> but it should probably go into 2.0 and the dev version.

This is almost a very good idea.  Problem is because of the quitidle
client-disconnecting bug the server will advance a turn and make another
savegame.  So if you /save and quit you'll get that save plus another
save, and it will take a very long time.

-jason




[Prev in Thread] Current Thread [Next in Thread]