aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitlbee.c6
-rw-r--r--ipc.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 64220914..5da5d6e1 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -238,6 +238,12 @@ gboolean bitlbee_io_new_client( GIOChannel *source, GIOCondition condition, gpoi
int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size );
pid_t client_pid = 0;
+ if( new_socket == -1 )
+ {
+ log_message( LOGLVL_WARNING, "Could not accept new connection: %s", strerror( errno ) );
+ return TRUE;
+ }
+
if( global.conf->runmode == RUNMODE_FORKDAEMON )
{
int fds[2];
diff --git a/ipc.c b/ipc.c
index 0fb56099..778f74c8 100644
--- a/ipc.c
+++ b/ipc.c
@@ -104,7 +104,7 @@ static const command_t ipc_master_commands[] = {
static void ipc_child_cmd_die( irc_t *irc, char **cmd )
{
- irc_abort( irc, 1, "Shutdown requested by operator" );
+ irc_abort( irc, 0, "Shutdown requested by operator" );
}
static void ipc_child_cmd_wallops( irc_t *irc, char **cmd )