diff options
Diffstat (limited to 'bitlbee.c')
-rw-r--r-- | bitlbee.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -122,6 +122,7 @@ int bitlbee_daemon_init() if( global.conf->runmode == RUNMODE_DAEMON || global.conf->runmode == RUNMODE_FORKDAEMON ) ipc_master_listen_socket(); +#ifndef _WIN32 if( ( fp = fopen( global.conf->pidfile, "w" ) ) ) { fprintf( fp, "%d\n", (int) getpid() ); @@ -131,6 +132,7 @@ int bitlbee_daemon_init() { log_message( LOGLVL_WARNING, "Warning: Couldn't write PID to `%s'", global.conf->pidfile ); } +#endif return( 0 ); } @@ -140,9 +142,6 @@ int bitlbee_inetd_init() if( !irc_new( 0 ) ) return( 1 ); - log_link( LOGLVL_ERROR, LOGOUTPUT_IRC ); - log_link( LOGLVL_WARNING, LOGOUTPUT_IRC ); - return( 0 ); } @@ -253,7 +252,6 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition socklen_t size = sizeof( struct sockaddr_in ); struct sockaddr_in conn_info; int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size ); - pid_t client_pid = 0; if( new_socket == -1 ) { @@ -261,8 +259,10 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition return TRUE; } +#ifndef _WIN32 if( global.conf->runmode == RUNMODE_FORKDAEMON ) { + pid_t client_pid = 0; int fds[2]; if( socketpair( AF_UNIX, SOCK_STREAM, 0, fds ) == -1 ) @@ -319,6 +319,7 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition } } else +#endif { log_message( LOGLVL_INFO, "Creating new connection with fd %d.", new_socket ); irc_new( new_socket ); |