mirror of
https://github.com/osmarks/ngircd.git
synced 2025-08-28 16:32:20 +00:00
Get rid of Log_SetDaemonized().
This commit is contained in:
parent
dbea187373
commit
de395db8e3
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#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 "imp.h"
|
||||||
#include <assert.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 char Init_Txt[127];
|
||||||
|
LOCAL bool Is_Daemon;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
LOCAL char Error_File[FNAME_LEN];
|
LOCAL char Error_File[FNAME_LEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOCAL Is_Daemon;
|
|
||||||
LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
|
LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
|
||||||
|
|
||||||
GLOBAL void Log_SetDaemonized(void) { Is_Daemon = true; }
|
|
||||||
|
|
||||||
GLOBAL void
|
GLOBAL void
|
||||||
Log_Init( void )
|
Log_Init( bool Daemon_Mode )
|
||||||
{
|
{
|
||||||
|
Is_Daemon = Daemon_Mode;
|
||||||
|
|
||||||
#ifdef SYSLOG
|
#ifdef SYSLOG
|
||||||
#ifndef LOG_CONS /* Kludge: mips-dec-ultrix4.5 has no LOG_CONS/LOG_LOCAL5 */
|
#ifndef LOG_CONS /* Kludge: mips-dec-ultrix4.5 has no LOG_CONS/LOG_LOCAL5 */
|
||||||
#define LOG_CONS 0
|
#define LOG_CONS 0
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
* Please read the file COPYING, README and AUTHORS for more information.
|
* 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)
|
* Logging functions (header)
|
||||||
*/
|
*/
|
||||||
@ -35,21 +35,20 @@
|
|||||||
#define LOG_snotice 1024
|
#define LOG_snotice 1024
|
||||||
|
|
||||||
|
|
||||||
GLOBAL void Log_Init PARAMS((void ));
|
GLOBAL void Log_Init PARAMS(( bool Daemon_Mode ));
|
||||||
GLOBAL void Log_Exit PARAMS((void ));
|
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_Init_Resolver PARAMS(( void ));
|
||||||
GLOBAL void Log_Exit_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
|
#ifdef DEBUG
|
||||||
GLOBAL void Log_InitErrorfile PARAMS((void ));
|
GLOBAL void Log_InitErrorfile PARAMS(( void ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GLOBAL void Log_SetDaemonized PARAMS((void));
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#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
|
* @file
|
||||||
@ -259,7 +259,7 @@ main( int argc, const char *argv[] )
|
|||||||
NGIRCd_SignalQuit = false;
|
NGIRCd_SignalQuit = false;
|
||||||
|
|
||||||
/* Initialize modules, part I */
|
/* Initialize modules, part I */
|
||||||
Log_Init( );
|
Log_Init( ! NGIRCd_NoDaemon );
|
||||||
Conf_Init( );
|
Conf_Init( );
|
||||||
|
|
||||||
if (!NGIRCd_Init( NGIRCd_NoDaemon )) {
|
if (!NGIRCd_Init( NGIRCd_NoDaemon )) {
|
||||||
@ -742,8 +742,6 @@ NGIRCd_Init( bool NGIRCd_NoDaemon )
|
|||||||
* connected to ther controlling terminal. Use "--nodaemon"
|
* connected to ther controlling terminal. Use "--nodaemon"
|
||||||
* to disable this "daemon mode" (useful for debugging). */
|
* to disable this "daemon mode" (useful for debugging). */
|
||||||
if ( ! NGIRCd_NoDaemon ) {
|
if ( ! NGIRCd_NoDaemon ) {
|
||||||
initialized = true;
|
|
||||||
Log_SetDaemonized();
|
|
||||||
pid = (long)fork( );
|
pid = (long)fork( );
|
||||||
if( pid > 0 ) {
|
if( pid > 0 ) {
|
||||||
/* "Old" process: exit. */
|
/* "Old" process: exit. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user