Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] (PR#11887) CivServer SIGINT Handler Patch
Home

[Freeciv-Dev] (PR#11887) CivServer SIGINT Handler Patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11887) CivServer SIGINT Handler Patch
From: "dl@xxxxxxxxx" <dl@xxxxxxxxx>
Date: Mon, 10 Jan 2005 13:07:54 -0800
Reply-to: bugs@xxxxxxxxxxx

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

Hello FreeCiv Dev's

Unfortunatily i came one CTRL-C while running a freeciv server, i was so
upset, and decided to write a patch to handle SIGINT the right way. I 
implemented
it as following:
The user needs to press CTRL-C twice within one second to shutdown the server,
so things as happened to me could not happen again to others. The patch
is pretty small, and i included preprocessor directives, to make sure, it
will not be included on Win32 machines, because i have no idea about signal
handling under windows. Would be great if that could be added one day...
Just apply the patch in the server/ directory as follows:
$>  patch < civserver-sigint.patch

(I wrote the patch for the 2.0.0-beta6 version)

It should compile without any warnings... testet with gcc-3.4.2 on FreeBSD
5.3
If you have any questions, feel free to contact me via email.

Thank you for reviewing this,

Yours,

David Leder

--
P.S.: The patch is also available at http://www.qolume.ch/civserver-sigint.patch
linux is a game, not a shame


Attachment: civserver-sigint.patch
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11887) CivServer SIGINT Handler Patch, dl@xxxxxxxxx <=