mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +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()
|
||||
{
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user