mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -54,20 +54,8 @@ void Process::terminate()
|
|||||||
|
|
||||||
BEAST_API bool BEAST_CALLTYPE beast_isRunningUnderDebugger()
|
BEAST_API bool BEAST_CALLTYPE beast_isRunningUnderDebugger()
|
||||||
{
|
{
|
||||||
static char testResult = 0;
|
bassertfalse; // XXX not implemented for FreeBSD!
|
||||||
|
return false;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BEAST_API bool BEAST_CALLTYPE Process::isRunningUnderDebugger()
|
BEAST_API bool BEAST_CALLTYPE Process::isRunningUnderDebugger()
|
||||||
|
|||||||
Reference in New Issue
Block a user