repo: ngircd action: commit revision: path_from: revision_from: 8edeed8418a4d9c76fe80e4391e8dd37f2c1ec78: path_to: revision_to:
commit 8edeed8418a4d9c76fe80e4391e8dd37f2c1ec78 Author: Alexander BartonDate: Mon Feb 7 19:31:34 2005 +0000 Make sure that errno of fopen() isn't overwritten by the logging code. diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
--- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: ngircd.c,v 1.88 2005/02/04 14:24:21 alex Exp $"; +static char UNUSED id[] = "$Id: ngircd.c,v 1.89 2005/02/07 19:31:34 alex Exp $"; #include "imp.h" #include@@ -618,12 +618,12 @@ Pidfile_Create( LONG pid ) /* Pidfile configured? */ if( ! Conf_PidFile[0] ) return; - pidf = fopen( Conf_PidFile, "w" ); - #ifdef DEBUG Log( LOG_DEBUG, "Creating PID file (%s) ...", Conf_PidFile ); #endif + pidf = fopen( Conf_PidFile, "w" ); + if( ! pidf ) { Log( LOG_ERR, "Error writing PID file (%s): %s", Conf_PidFile, strerror( errno ));
-----END OF PAGE-----