From 543471e840be449c53d44b32c7adf1261ad67e37 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Tue, 8 Oct 2019 06:11:43 +0000 Subject: [PATCH] unix: add new func PtraceInterrupt on Linux Add to the unix package a new func to allow ptrace using PTRACE_INTERRUPT. Fixes golang/go#34755 Change-Id: Ie50ae14c6eb5b3005dda2f8eefee57dd5bd6f360 GitHub-Last-Rev: 7e93ff4d870a9947b044d0dc5dc48e5d61dad3e0 GitHub-Pull-Request: golang/sys#45 Reviewed-on: https://go-review.googlesource.com/c/sys/+/199504 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser --- unix/syscall_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index 1047d719..ebf3195b 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -1493,6 +1493,8 @@ func PtraceSyscall(pid int, signal int) (err error) { func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } +func PtraceInterrupt(pid int) (err error) { return ptrace(PTRACE_INTERRUPT, pid, 0, 0) } + func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } func PtraceSeize(pid int) (err error) { return ptrace(PTRACE_SEIZE, pid, 0, 0) }