Get rid of Log_SetDaemonized().

This commit is contained in:
Alexander Barton 2005-06-24 19:55:10 +00:00
parent dbea187373
commit de395db8e3
3 changed files with 16 additions and 17 deletions

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: log.c,v 1.56 2005/06/24 19:20:56 fw Exp $";
static char UNUSED id[] = "$Id: log.c,v 1.57 2005/06/24 19:55:10 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -45,19 +45,21 @@ static char UNUSED id[] = "$Id: log.c,v 1.56 2005/06/24 19:20:56 fw Exp $";
LOCAL char Init_Txt[127];
LOCAL bool Is_Daemon;
#ifdef DEBUG
LOCAL char Error_File[FNAME_LEN];
#endif
LOCAL Is_Daemon;
LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
GLOBAL void Log_SetDaemonized(void) { Is_Daemon = true; }
GLOBAL void
Log_Init( void )
Log_Init( bool Daemon_Mode )
{
Is_Daemon = Daemon_Mode;
#ifdef SYSLOG
#ifndef LOG_CONS /* Kludge: mips-dec-ultrix4.5 has no LOG_CONS/LOG_LOCAL5 */
#define LOG_CONS 0

View File

@ -8,7 +8,7 @@
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
* $Id: log.h,v 1.17 2005/06/24 19:20:56 fw Exp $
* $Id: log.h,v 1.18 2005/06/24 19:55:10 alex Exp $
*
* Logging functions (header)
*/
@ -35,21 +35,20 @@
#define LOG_snotice 1024
GLOBAL void Log_Init PARAMS((void ));
GLOBAL void Log_Exit PARAMS((void ));
GLOBAL void Log_Init PARAMS(( bool Daemon_Mode ));
GLOBAL void Log_Exit PARAMS(( void ));
GLOBAL void Log PARAMS((int Level, const char *Format, ... ));
GLOBAL void Log PARAMS(( int Level, const char *Format, ... ));
GLOBAL void Log_Init_Resolver PARAMS((void ));
GLOBAL void Log_Exit_Resolver PARAMS((void ));
GLOBAL void Log_Init_Resolver PARAMS(( void ));
GLOBAL void Log_Exit_Resolver PARAMS(( void ));
GLOBAL void Log_Resolver PARAMS((const int Level, const char *Format, ... ));
GLOBAL void Log_Resolver PARAMS(( const int Level, const char *Format, ... ));
#ifdef DEBUG
GLOBAL void Log_InitErrorfile PARAMS((void ));
GLOBAL void Log_InitErrorfile PARAMS(( void ));
#endif
GLOBAL void Log_SetDaemonized PARAMS((void));
#endif

View File

@ -12,7 +12,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: ngircd.c,v 1.101 2005/06/24 19:20:56 fw Exp $";
static char UNUSED id[] = "$Id: ngircd.c,v 1.102 2005/06/24 19:55:10 alex Exp $";
/**
* @file
@ -259,7 +259,7 @@ main( int argc, const char *argv[] )
NGIRCd_SignalQuit = false;
/* Initialize modules, part I */
Log_Init( );
Log_Init( ! NGIRCd_NoDaemon );
Conf_Init( );
if (!NGIRCd_Init( NGIRCd_NoDaemon )) {
@ -742,8 +742,6 @@ NGIRCd_Init( bool NGIRCd_NoDaemon )
* connected to ther controlling terminal. Use "--nodaemon"
* to disable this "daemon mode" (useful for debugging). */
if ( ! NGIRCd_NoDaemon ) {
initialized = true;
Log_SetDaemonized();
pid = (long)fork( );
if( pid > 0 ) {
/* "Old" process: exit. */