Changeset cd63d58 for ipc.c


Ignore:
Timestamp:
2008-06-29T12:47:39Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f5d1b31
Parents:
1145964
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipc.c

    r1145964 rcd63d58  
    3333
    3434GSList *child_list = NULL;
    35 static char *statefile = NULL;
    3635
    3736static void ipc_master_cmd_client( irc_t *data, char **cmd )
     
    501500}
    502501
    503 void ipc_master_set_statefile( char *fn )
    504 {
    505         statefile = g_strdup( fn );
    506 }
    507 
    508502
    509503static gboolean new_ipc_client( gpointer data, gint serversock, b_input_condition cond )
     
    566560#endif
    567561
    568 int ipc_master_load_state()
     562int ipc_master_load_state( char *statefile )
    569563{
    570564        struct bitlbee_child *child;
     
    574568        if( statefile == NULL )
    575569                return 0;
     570       
    576571        fp = fopen( statefile, "r" );
    577572        unlink( statefile );    /* Why do it later? :-) */
Note: See TracChangeset for help on using the changeset viewer.