From 2a81289ed32d9e1ca612a41975974bfa258d2ace Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 21 May 2020 22:58:56 +0800 Subject: [PATCH] Make DEBUG_NOFORK a #if not #ifdef --- debug.h | 4 +++- svr-main.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debug.h b/debug.h index 8659b5c..403449b 100644 --- a/debug.h +++ b/debug.h @@ -66,7 +66,9 @@ extern int debug_trace; /* To debug with GDB it is easier to run with no forking of child processes. You will need to pass "-F" as well. */ -/* #define DEBUG_NOFORK */ +#ifndef DEBUG_NOFORK +#define DEBUG_NOFORK 0 +#endif /* For testing as non-root on shadowed systems, include the crypt of a password diff --git a/svr-main.c b/svr-main.c index 0a39b70..00f854f 100644 --- a/svr-main.c +++ b/svr-main.c @@ -273,7 +273,7 @@ static void main_noinetd() { goto out; } -#ifdef DEBUG_NOFORK +#if DEBUG_NOFORK fork_ret = 0; #else fork_ret = fork();