Linux implementation of isRunningUnderDebugger using ptrace() doesn't work on FreeBSD.

(I doubt it'll work on Linux, too, but I'm not sure)
This commit is contained in:
Alex Dupre
2013-07-03 10:00:40 +02:00
committed by Vinnie Falco
parent bba1ab079e
commit 8d4d5038aa

View File

@@ -54,20 +54,8 @@ void Process::terminate()
BEAST_API bool BEAST_CALLTYPE beast_isRunningUnderDebugger()
{
static char testResult = 0;
if (testResult == 0)
{
testResult = (char) ptrace (PT_TRACE_ME, 0, 0, 0);
if (testResult >= 0)
{
ptrace (PT_DETACH, 0, (caddr_t) 1, 0);
testResult = 1;
}
}
return testResult < 0;
bassertfalse; // XXX not implemented for FreeBSD!
return false;
}
BEAST_API bool BEAST_CALLTYPE Process::isRunningUnderDebugger()