浏览代码

unix: add new func PtraceSeize on Linux

Add to the unix package a new func to allow ptrace using PTRACE_SEIZE.

Fixes golang/go#34717

Change-Id: I6518868b99311a4608f21d249fe670990bfec555
GitHub-Last-Rev: 8a694c4f23be106fcd7acd16899a4d75699140f6
GitHub-Pull-Request: golang/sys#44
Reviewed-on: https://go-review.googlesource.com/c/sys/+/199497
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Paulo Gomes 6 年之前
父节点
当前提交
4ac5d0cebf
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      unix/syscall_linux.go

+ 2 - 0
unix/syscall_linux.go

@@ -1495,6 +1495,8 @@ func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pi
 
 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) }
+
 func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
 
 //sys	reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)