#include "citadel.h"
#include "server.h"
#include "proto.h"
+#include "sysdep_decls.h"
+#include "citserver.h"
#ifdef NEED_SELECT_H
#include <sys/select.h>
* The action for unexpected signals and exceptions should be to
* call master_cleanup() to gracefully shut down the server.
*/
- signal(SIGINT, master_cleanup);
- signal(SIGQUIT, master_cleanup);
- signal(SIGHUP, master_cleanup);
- signal(SIGTERM, master_cleanup);
+ signal(SIGINT, (void(*)(int))master_cleanup);
+ signal(SIGQUIT, (void(*)(int))master_cleanup);
+ signal(SIGHUP, (void(*)(int))master_cleanup);
+ signal(SIGTERM, (void(*)(int))master_cleanup);
}
lprintf(1, "citserver: can't allocate memory!!\n");
pthread_exit(NULL);
}
+ bzero(me, sizeof(struct CitContext));
begin_critical_section(S_SESSION_TABLE);
me->next = ContextList;
* The system-dependent part of master_cleanup() - close the master socket.
*/
void sysdep_master_cleanup(void) {
- lprintf(3, "Closing master socket %d\n", msock);
+ lprintf(7, "Closing master socket %d\n", msock);
close(msock);
}