From 6f7b608facb09fbcc8e955615b49b239df07513e Mon Sep 17 00:00:00 2001 From: stskeeps Date: Sun, 6 Aug 2000 08:25:18 +0000 Subject: [PATCH] Index: Changes =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/Changes,v retrieving revision 1.1.1.1.2.1.2.1.2.170 diff -u -r1.1.1.1.2.1.2.1.2.170 Changes --- Changes 2000/08/06 08:06:36 1.1.1.1.2.1.2.1.2.170 +++ Changes 2000/08/06 08:24:08 @@ -517,3 +517,4 @@ the ircd logs it to ircd.log and dies - Updated ./ircd to also say to look at ircd.log - Fixed a SQLINE synch bug +- Added command line option -F to prevent the ircd to fork out --- Changes | 1 + include/struct.h | 1 + src/ircd.c | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index bfc308c43..1940227cc 100644 --- a/Changes +++ b/Changes @@ -517,3 +517,4 @@ the ircd logs it to ircd.log and dies - Updated ./ircd to also say to look at ircd.log - Fixed a SQLINE synch bug +- Added command line option -F to prevent the ircd to fork out diff --git a/include/struct.h b/include/struct.h index be28bb460..9288c6d65 100644 --- a/include/struct.h +++ b/include/struct.h @@ -140,6 +140,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define BOOT_TTY 16 #define BOOT_OPER 32 #define BOOT_AUTODIE 64 +#define BOOT_NOFORK 128 #define STAT_LOG -6 /* logfile for -x */ #define STAT_CONNECTING -4 diff --git a/src/ircd.c b/src/ircd.c index 8a6eadcf7..71bc95ffe 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -786,6 +786,9 @@ int InitwIRCD(argc, argv) #endif dpath = p; break; + case 'F': + bootopt |= BOOT_NOFORK; + break; #ifndef _WIN32 #ifdef CMDLINE_CONFIG case 'f': @@ -1065,8 +1068,9 @@ int InitwIRCD(argc, argv) me.lasttime = me.since = me.firsttime = TStime(); (void)add_to_client_hash_table(me.name, &me); #if !defined(_AMIGA) && !defined(_WIN32) && !defined(NO_FORKING) - if (fork()) - exit(0); + if (!(bootopt & BOOT_NOFORK)) + if (fork()) + exit(0); #endif