]> Cypherpunks.ru repositories - gostls13.git/commitdiff
syscall: improve linux SysProcAttr documentation
authorKir Kolyshkin <kolyshkin@gmail.com>
Sun, 3 Sep 2023 20:49:10 +0000 (13:49 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 7 Sep 2023 19:17:23 +0000 (19:17 +0000)
The SysProcAttr is OS-specific anyway, so it makes little sense to say
that some fields are Linux-specific (they all are anyway).

While at it, make sure to use complete sentences (add missing periods).

Change-Id: Ic0afe3920c2561fd9a657f4edab21939a8f56d57
Reviewed-on: https://go-review.googlesource.com/c/go/+/525395
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/syscall/exec_linux.go

index 791b263b2a906a92e0e55de2b9fe23b8a2cb6dbd..fb9a5dc90715cd47a709bd3f6bfb208e00c5f8c2 100644 (file)
@@ -75,8 +75,8 @@ type SysProcAttr struct {
        // in the child process: an index into ProcAttr.Files.
        // This is only meaningful if Setsid is true.
        Setctty bool
-       Noctty  bool // Detach fd 0 from controlling terminal
-       Ctty    int  // Controlling TTY fd
+       Noctty  bool // Detach fd 0 from controlling terminal.
+       Ctty    int  // Controlling TTY fd.
        // Foreground places the child process group in the foreground.
        // This implies Setpgid. The Ctty field must be set to
        // the descriptor of the controlling TTY.
@@ -89,8 +89,8 @@ type SysProcAttr struct {
        // is sent on thread termination, which may happen before process termination.
        // There are more details at https://go.dev/issue/27505.
        Pdeathsig    Signal
-       Cloneflags   uintptr        // Flags for clone calls (Linux only)
-       Unshareflags uintptr        // Flags for unshare calls (Linux only)
+       Cloneflags   uintptr        // Flags for clone calls.
+       Unshareflags uintptr        // Flags for unshare calls.
        UidMappings  []SysProcIDMap // User ID mappings for user namespaces.
        GidMappings  []SysProcIDMap // Group ID mappings for user namespaces.
        // GidMappingsEnableSetgroups enabling setgroups syscall.
@@ -98,7 +98,7 @@ type SysProcAttr struct {
        // This parameter is no-op if GidMappings == nil. Otherwise for unprivileged
        // users this should be set to false for mappings work.
        GidMappingsEnableSetgroups bool
-       AmbientCaps                []uintptr // Ambient capabilities (Linux only)
+       AmbientCaps                []uintptr // Ambient capabilities.
        UseCgroupFD                bool      // Whether to make use of the CgroupFD field.
        CgroupFD                   int       // File descriptor of a cgroup to put the new process into.
        // PidFD, if not nil, is used to store the pidfd of a child, if the