/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* posix.c: Thread-related code common to POSIX systems
- *
+ *
* Known contributors to this file:
* Markus Armbruster, 2006
*/
#include <config.h>
#include <signal.h>
+#include <unistd.h>
#include "empthread.h"
+#include "journal.h"
#include "prototypes.h"
static void panic(int sig);
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
- act.sa_handler = shutdwn;
- sigaction(SIGTERM, &act, NULL);
- sigaction(SIGINT, &act, NULL);
act.sa_handler = panic;
sigaction(SIGBUS, &act, NULL);
sigaction(SIGSEGV, &act, NULL);
logerror("server received fatal signal %d", sig);
log_last_commands();
ef_fin_srv();
+ journal_shutdown();
/* End of unsafe code */
if (CANT_HAPPEN(sig != SIGBUS && sig != SIGSEGV