< prev index next >
src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -687,12 +687,12 @@
}
// attach to a process/thread specified by "pid"
static bool ptrace_attach(pid_t pid) {
int res;
- if ((res = ptrace(PT_ATTACH, pid, 0, 0)) < 0) {
- print_error("ptrace(PT_ATTACH, %d) failed with %d\n", pid, res);
+ if ((res = ptrace(PT_ATTACHEXC, pid, 0, 0)) < 0) {
+ print_error("ptrace(PT_ATTACHEXC, %d) failed with %d\n", pid, res);
return false;
} else {
return ptrace_waitpid(pid);
}
}
< prev index next >