Skip to content
Snippets Groups Projects
Commit 0349f7ec authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

The AIX uses "PT_DETACH" for "PTRACE_DETACH". For some odd reason

PTRACE_DETRACE is defined on AIX, but it is the incorrect value.
PT_DETACH is correct.
parent 5c274e12
No related branches found
No related tags found
No related merge requests found
......@@ -634,7 +634,11 @@ _pdebug_trace_process(slurmd_job_t *job, pid_t pid)
waitpid(pid, &status, WUNTRACED);
if ((pid > (pid_t) 0) && (kill(pid, SIGSTOP) < 0))
error("kill(%lu): %m", (unsigned long) pid);
#ifdef HAVE_AIX
if (_PTRACE(PT_DETACH, pid, NULL, 0))
#else
if (_PTRACE(PTRACE_DETACH, pid, NULL, 0))
#endif
error("ptrace(%lu): %m", (unsigned long) pid);
}
}
......@@ -649,6 +653,10 @@ _pdebug_stop_current(slurmd_job_t *job)
* Stop the task on exec for TotalView to connect
*/
if ( (job->task_flags & TASK_PARALLEL_DEBUG)
#ifdef HAVE_AIX
&& (_PTRACE(PT_TRACE_ME, 0, NULL, 0) < 0) )
#else
&& (_PTRACE(PTRACE_TRACEME, 0, NULL, 0) < 0) )
#endif
error("ptrace: %m");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment