Well, it seems there's not really happening anything at the time the mud stops. After all, you're in "sleep mode", waiting for new connections.
You could try to run your code through gdb, as specified here:
www.tbamud.com/forum/4-development/6-debugging-tutorial-for-gdb
Or you could have a look on your system. Could it be that the mud process is killed by some watchdog daemon? The code you are showing and the my_signal(SIGHUP, hupsig) calls makes sure that the code in hupsig() gets called:
Code:
/* Dying anyway... */
static RETSIGTYPE hupsig(int sig)
{
log("SYSERR: Received SIGHUP, SIGINT, or SIGTERM. Shutting down...");
exit(1); /* perhaps something more elegant should substituted */
}
Basically, just logging and then shutting down.
So, it's something external sending the signal to shut down and your mud is complying. The message is just there to notify you that the mud was killed in an orderly fashion.