From 2d75b56071f216cc3c8ff9791326df074ec4b806 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 9 Jan 2006 21:56:09 +0100 Subject: Added a check for the fork() return value, that should actually be enough for error handling. --- bitlbee.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitlbee.c') 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; -- cgit v1.2.3