add "nofork" parameter
to disable process forking might be useful for gdb and perf
This commit is contained in:
1 parent
7bb3e4445e
commit
d5583ba040
1 file changed
+7
-3
+7
-3
@@ -1923,7 +1923,10 @@ INT32 I_StartupSystem(void)
|
||||
SDL_GetVersion(&SDLlinked);
|
||||
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();
|
||||
@@ -2215,9 +2218,10 @@ void I_ShutdownSystem(void)
|
||||
{
|
||||
INT32 c;
|
||||
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
I_ShutdownConsole();
|
||||
#ifdef NEWSIGNALHANDLER
|
||||
if (M_CheckParm("-nofork"))
|
||||
#endif
|
||||
I_ShutdownConsole();
|
||||
|
||||
for (c = MAX_QUIT_FUNCS-1; c >= 0; c--)
|
||||
if (quit_funcs[c])
|
||||
|
||||
Reference in new issue
Block a user