[Freeciv-Dev] Re: Patch for civserver: save game on SIGPWR, SIGTERM or S
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 3 May 2001, Eric R. Smith wrote:
>Attached is a small patch to provide "emergency" saves when certain
>signals (like SIGPWR) are received. This means that when your
>fancy UPS notices that the power is down, it can shut down the
>civserver without any moves or data being lost. It also provides
>a way to "gracefully" shut down the server if you can't get
>access to the console but can log in remotely -- just send it a
>SIGTERM or SIGHUP signal. (Before, doing this just killed the
>game with no save file being created.)
Almost zero-probability pitholes:
1) what if SIGxxx is caught in the middle of saving the game
2) what if signals, say SIGHUP and SIGTERM, arrive in (very
close) succession
Well these are extremely rare cases and I vote for these nice patch even
without addressing those cases (for this will save 99 games that otherwise
would get lost at lose at most 1 game that otherwise would get saved ;-).
Mika
_______________________________________________________________________________
I just asked myself... what would John DeLorean do?
-- Raoul Duke
|
|