]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: document LockOSThread with GNU/Linux SysProcAttr.Ptrace
authorIan Lance Taylor <iant@golang.org>
Thu, 20 Dec 2018 02:25:08 +0000 (18:25 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 27 Dec 2018 18:53:02 +0000 (18:53 +0000)
Fixes #28315

Change-Id: Ie02c72d02ad2f66c9cdbbba579a304641f327672
Reviewed-on: https://go-review.googlesource.com/c/155138
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/exec_linux.go

index 7ae3177fdc087859dc4834fe064a02095885e9a1..6c761f85c441882e0b5d2adc4c947c834fe209d8 100644 (file)
@@ -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)