[Freeciv-Dev] Re: Patch for civserver: save game on SIGPWR, SIGTERMor S
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason Short wrote:
Sorry for the clutter, but I have a follow-up.
> I have a solution, patch below, that should solve both problems. I'm
> not prepared to offer a proof of its correctness, but I think it's
> clean. Certainly it is an improvement. The code is pretty heavily
> commented on why it should be correct.
>
> Patch (made against current CVS) is at
> http://devon.dhs.org/freeciv/save_game_on_signal.patch
The above patch adds code to save_game() to make sure it's not
interrupted. Upon further consideration, this may not be worth the
bloating to the code. By removing it, it's still not possible for a
panic save to be interrupted, but a regular save may be interrupted and
replaced by a panic save. This will certainly corrupt the regular save
file, but the panic save file should be okay as long as the save_game()
function will work okay with it (which I haven't really checked). I
can't really decide between the two.
http://devon.dhs.org/freeciv/save_game_on_signal2.patch
jason short
|
|