On Wed, 1 Aug 2001, Dwight Durmon wrote:
>RETSIGTYPE nologin(int sig)
>{
> if (!login) {
> log("Recieved SIGALRM. Disallowing Logins...");
> login=1;
> send_to_all("NOTICE: The mud is going down for maintenance. Your game will
>be saved and you will be disconnected now!");
> Crash_save_all();
> House_save_all();
[...]
You really don't want to do that in a signal handler. Imagine what happens
if your signal happens to occur during a different player saving. Just set
a global variable and check for it after heartbeat() in game_loop.
--
George Greer
greerga@circlemud.org
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST