diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-06-29 13:47:39 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-06-29 13:47:39 +0100 |
commit | cd63d5822e76a6126bb3017567c9ce2869a44e0b (patch) | |
tree | 58177973085309fd2e3089864037c33cccaafe94 /ipc.c | |
parent | 1145964911d0d7dd5145de6f7b9d4ed8aeeacd79 (diff) |
Now using an environment variable instead of a flag to pass state info when
restarting the ForkDaemon. Preparing for a proper fallback when execv()
fails. (Bug #425)
Diffstat (limited to 'ipc.c')
-rw-r--r-- | ipc.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -32,7 +32,6 @@ #endif GSList *child_list = NULL; -static char *statefile = NULL; static void ipc_master_cmd_client( irc_t *data, char **cmd ) { @@ -500,11 +499,6 @@ char *ipc_master_save_state() } } -void ipc_master_set_statefile( char *fn ) -{ - statefile = g_strdup( fn ); -} - static gboolean new_ipc_client( gpointer data, gint serversock, b_input_condition cond ) { @@ -565,7 +559,7 @@ int ipc_master_listen_socket() /* FIXME: Open named pipe \\.\BITLBEE */ #endif -int ipc_master_load_state() +int ipc_master_load_state( char *statefile ) { struct bitlbee_child *child; FILE *fp; @@ -573,6 +567,7 @@ int ipc_master_load_state() if( statefile == NULL ) return 0; + fp = fopen( statefile, "r" ); unlink( statefile ); /* Why do it later? :-) */ if( fp == NULL ) |