proc: Refactor ptrace calls on Darwin

This commit is contained in:
Derek Parker
2015-10-06 10:45:36 -07:00
parent 769dd59b4d
commit c731a83424
2 changed files with 10 additions and 21 deletions

View File

@ -673,7 +673,7 @@ func (dbp *Process) run(fn func() error) error {
func (dbp *Process) handlePtraceFuncs() {
// We must ensure here that we are running on the same thread during
// the execution of dbg. This is due to the fact that ptrace(2) expects
// while invoking the ptrace(2) syscall. This is due to the fact that ptrace(2) expects
// all commands after PTRACE_ATTACH to come from the same thread.
runtime.LockOSThread()