aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-12-19 18:25:08 -0800
committerIan Lance Taylor <iant@golang.org>2018-12-27 18:53:02 +0000
commitb115207baf6c2decc3820ada4574ef4e5ad940ec (patch)
tree3e5556904b98401d4680a1d4163a6d3c5dbb3a42 /src/syscall
parentc0914d5df3f12449f52e26eb0aaa58661ad92250 (diff)
downloadgo-b115207baf6c2decc3820ada4574ef4e5ad940ec.tar.xz
syscall: document LockOSThread with GNU/Linux SysProcAttr.Ptrace
Fixes #28315 Change-Id: Ie02c72d02ad2f66c9cdbbba579a304641f327672 Reviewed-on: https://go-review.googlesource.com/c/155138 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/exec_linux.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go
index 7ae3177fdc..6c761f85c4 100644
--- a/src/syscall/exec_linux.go
+++ b/src/syscall/exec_linux.go
@@ -20,9 +20,12 @@ type SysProcIDMap struct {
}
type SysProcAttr struct {
- Chroot string // Chroot.
- Credential *Credential // Credential.
- Ptrace bool // Enable tracing.
+ Chroot string // Chroot.
+ Credential *Credential // Credential.
+ // Ptrace tells the child to call ptrace(PTRACE_TRACEME).
+ // Call runtime.LockOSThread before starting a process with this set,
+ // and don't call UnlockOSThread until done with PtraceSyscall calls.
+ Ptrace bool
Setsid bool // Create session.
Setpgid bool // Set process group ID to Pgid, or, if Pgid == 0, to new pid.
Setctty bool // Set controlling terminal to fd Ctty (only meaningful if Setsid is set)