From 7c34733eea9aa8f6c00bf71ca923722b016584a4 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 28 May 2025 23:57:53 +0200 Subject: [PATCH] add nofork parameter to dedibuild --- src/dedicated/i_system.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c index 58840b1d3..6ab748f86 100644 --- a/src/dedicated/i_system.c +++ b/src/dedicated/i_system.c @@ -1439,7 +1439,10 @@ INT32 I_StartupSystem(void) { I_StartupConsole(); #ifdef NEWSIGNALHANDLER - I_Fork(); + // This is useful when debugging. It lets GDB attach to + // the correct process easily. + if (!M_CheckParm("-nofork")) + I_Fork(); #endif #ifdef HAVE_THREADS I_start_threads();