diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-09 21:56:09 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-09 21:56:09 +0100 |
commit | 2d75b56071f216cc3c8ff9791326df074ec4b806 (patch) | |
tree | cd88e12b47662f0a7625d7377aa1f26caa904998 | |
parent | 08995b0801a00ef5cbcc12d7eb070ef349dde64e (diff) |
Added a check for the fork() return value, that should actually be enough for error handling.
-rw-r--r-- | bitlbee.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |