aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-09 21:56:09 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-09 21:56:09 +0100
commit2d75b56071f216cc3c8ff9791326df074ec4b806 (patch)
treecd88e12b47662f0a7625d7377aa1f26caa904998
parent08995b0801a00ef5cbcc12d7eb070ef349dde64e (diff)
Added a check for the fork() return value, that should actually be enough for error handling.
-rw-r--r--bitlbee.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 6e36bd12..c6ae6b22 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -58,6 +58,10 @@ gboolean bitlbee_io_new_client( GIOChannel *source, GIOCondition condition, gpoi
{
/* We don't need this one, only the client does. */
close( new_socket );
+
+ /* Or maybe we didn't even get a child process... */
+ if( client_pid == -1 )
+ log_message( LOGLVL_ERROR, "Failed to fork() subprocess for client: %s", strerror( errno ) );
}
return TRUE;