[Commits] [wesnoth/wesnoth] 019e7a: campaignd: Only quit to SIGINT and SIGTERM after a...

GitHub noreply at github.com
Sun Oct 9 06:58:07 UTC 2016


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 019e7a72c741740650ea3930a6dfbfe50bde7c54
      https://github.com/wesnoth/wesnoth/commit/019e7a72c741740650ea3930a6dfbfe50bde7c54
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2016-10-09 (Sun, 09 Oct 2016)

  Changed paths:
    M src/campaign_server/campaign_server.cpp

  Log Message:
  -----------
  campaignd: Only quit to SIGINT and SIGTERM after a processing cycle

Otherwise we run the risk (as seen with the 2016-10-07~09 downtime
incident) of calling exit() while we're in the middle of writing WML
content to disk, in particular the add-ons list and server configuration
file. Trust me, no-one will be very impressed if you make them sort out
the mess that this kind of thing leaves behind.

Ideally we should atomically rename a temporary into the destination
file for each WML write we do here to avoid similar ugliness with
signals we don't/can't/mustn't handle (especially SIGKILL). It's always
best to stay on the safe side and assume that a botched write could kill
people.





More information about the Commits mailing list