From d9628b27abfb090d854f77073bc9a1870d804164 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 19 Jul 2012 15:27:18 -0700 Subject: Hopefully make shutdown more clean. --- src/map/map.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/map') diff --git a/src/map/map.c b/src/map/map.c index 4f661af..d840486 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1876,7 +1876,7 @@ static void map_set_logfile (char *filename) gettimeofday (&tv, NULL); map_start_logfile (tv.tv_sec); - atexit (map_close_logfile); + MAP_LOG ("log-start v3"); } @@ -2063,8 +2063,10 @@ static int cleanup_sub (struct block_list *bl, va_list ap) * map鯖終了時処理 *------------------------------------------ */ -void do_final (void) +void term_func (void) { + map_close_logfile (); + int map_id, i; for (map_id = 0; map_id < map_num; map_id++) @@ -2121,10 +2123,6 @@ int compare_item (struct item *a, struct item *b) (a->card[2] == b->card[2]) && (a->card[3] == b->card[3])); } -// TODO move shutdown stuff here -void term_func (void) -{ -} /*====================================================== * Map-Server Init and Command-line Arguments [Valaris] *------------------------------------------------------ @@ -2163,8 +2161,6 @@ int do_init (int argc, char *argv[]) script_config_read (SCRIPT_CONF_NAME); msg_config_read (MSG_CONF_NAME); - atexit (do_final); - id_db = numdb_init (); map_db = strdb_init (16); nick_db = strdb_init (24); -- cgit v1.2.3-70-g09d2