Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
771c19a275
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      build/linux/platform_specific_code/juce_linux_Threads.cpp

+ 7
- 4
build/linux/platform_specific_code/juce_linux_Threads.cpp View File

@@ -347,13 +347,16 @@ bool JUCE_CALLTYPE juce_isRunningUnderDebugger() throw()
if (testResult == 0)
{
testResult = (ptrace (PTRACE_TRACEME, 0, 0, 0) < 0) ? 1 : -1;
testResult = (char) ptrace (PT_TRACE_ME, 0, 0, 0);
if (testResult < 0)
ptrace (PTRACE_DETACH, 0, (caddr_t) 1, 0);
if (testResult >= 0)
{
ptrace (PT_DETACH, 0, (caddr_t) 1, 0);
testResult = 1;
}
}
return testResult > 0;
return testResult < 0;
}
bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw()


Loading…
Cancel
Save