Commit b6e66639 authored by Austin Clements's avatar Austin Clements

Return ptrace event message when there's no error instead of

only when there's an error.

R=rsc
APPROVED=rsc
DELTA=3  (0 added, 2 deleted, 1 changed)
OCL=31650
CL=31650
parent ba9d6973
...@@ -521,9 +521,7 @@ func PtraceSetOptions(pid int, options int) (errno int) { ...@@ -521,9 +521,7 @@ func PtraceSetOptions(pid int, options int) (errno int) {
func PtraceGetEventMsg(pid int) (msg uint, errno int) { func PtraceGetEventMsg(pid int) (msg uint, errno int) {
var data _C_long; var data _C_long;
errno = ptrace(_PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data))); errno = ptrace(_PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)));
if errno != 0 { msg = uint(data);
msg = uint(data);
}
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment