[NEWBIE] shutdown/reboot of mud (everything is almost working!)

From: Dwight Durmon (ddurmon@yahoo.com)
Date: 08/01/01

Ok.... I created the functions and signal handlers and everything works as far
as not allowing new connections...  Can anyone point me in the right direction
on how to parse the active connections and disconnect them without killing the
server completely.  I tried a while loop, but that just caused the server to
shutdown and reboot, effectively closing all connections, and then resetting my



CODE BEGINS HERE (all code is contained in comm.c) :

------------------ SNIP -------------------------
int login = 0;  /* to limit logins */
------------------ SNIP -------------------------
RETSIGTYPE nologin (int sig);
------------------ SNIP -------------------------
------------------ SNIP -------------------------
RETSIGTYPE nologin(int sig)
         if (!login) {
        log("Recieved SIGALRM.  Disallowing Logins...");
        send_to_all("NOTICE:  The mud is going down for maintenance.  Your game will
be saved and you will be disconnected now!");

        /* Need to kill active connections here!! */

  } else {
     log("Recieved SIGALRM.  Allowing new logins...");
------------------ SNIP -------------------------
/* check for login lock */
  if (login) {
    write_to_descriptor(desc, "\r\n\r\nSorry, logins are not allowed at the
current time.  Please try again later!\r\n\r\n");
    return (0);
------------------ SNIP -------------------------

So in the dark we hide the heart that bleeds, And wait, and tend our agonizing seeds. - Countee Cullen.

Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger

   | 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