Finally merge the journal patch:

(keep_journal): New econfig key.
(player_main): Log player login and logout.
(recvclient): Log player input.
(ef_open_srv, ef_close_srv): Log startup and shutdown.
(update_main): Log update.

Support the common SIGHUP log rotation idiom:
(empth_wait_for_shutdown, empth_wait_for_signal): Rename.
[EMPTH_LWP, EMPTH_POSIX] (empth_init, empth_wait_for_signal): Wait for
SIGHUP as well.
(main) [SIGHUP]: Reopen journal when empth_wait_for_signal() returns
SIGHUP.
This commit is contained in:
Markus Armbruster 2006-06-08 20:11:26 +00:00
parent ff2a162587
commit 1ca0b5cb2b
13 changed files with 239 additions and 9 deletions

View file

@ -34,6 +34,7 @@
#include <config.h>
#include "file.h"
#include "journal.h"
#include "prototypes.h"
struct fileinit {
@ -98,6 +99,8 @@ static void
ef_open_srv(void)
{
int failed = 0;
failed |= journal_startup() < 0;
failed |= !ef_open(EF_NATION, EFF_MEM);
failed |= !ef_open(EF_SECTOR, EFF_MEM);
failed |= !ef_open(EF_SHIP, EFF_MEM);
@ -142,6 +145,7 @@ ef_close_srv(void)
ef_close(EF_BMAP);
ef_close(EF_LOST);
ef_close(EF_REALM);
journal_shutdown();
}
static int