From b1a320fc95ad2c69da6d9cb6c7e2ca6934f3e598 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 27 May 2004 04:57:15 +0000 Subject: [PATCH] Linuxthreads (pre-NPTL) sigaltstack is broken even if we're in 2.6. --- stepmania/src/archutils/Unix/SignalHandler.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stepmania/src/archutils/Unix/SignalHandler.cpp b/stepmania/src/archutils/Unix/SignalHandler.cpp index 0045b1bc9c..81c1a96221 100644 --- a/stepmania/src/archutils/Unix/SignalHandler.cpp +++ b/stepmania/src/archutils/Unix/SignalHandler.cpp @@ -4,6 +4,10 @@ #include "SignalHandler.h" #include "GetSysInfo.h" +#if defined(LINUX) +#include "archutils/Unix/LinuxThreadHelpers.h" +#endif + #include #include #include @@ -117,17 +121,13 @@ void SignalHandler::OnClose(handler h) bool bUseAltSigStack = true; #if defined(LINUX) - /* Ugh. Signal stack + pthreads + Linux 2.4 = crash or hang. */ - CString system; - int version; - GetKernel( system, version ); - - /* Allocate a separate signal stack. This makes the crash handler work - * if we run out of stack space. */ - if( version < 20500 ) + /* Linuxthreads (pre-NPTL) sigaltstack is broken. */ + if( !UsingNPTL() ) bUseAltSigStack = false; #endif + /* Allocate a separate signal stack. This makes the crash handler work + * if we run out of stack space. */ const int AltStackSize = 1024*64; void *p = NULL; if( bUseAltSigStack )