diff options
| author | Kir Kolyshkin <kolyshkin@gmail.com> | 2023-09-03 13:49:10 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-07 19:17:23 +0000 |
| commit | 2b46cffe574432bd902e9e20fb00846cc2d2817d (patch) | |
| tree | 09bfb175a6c0bf93d3bb55d660fe07b9c789b61b /src | |
| parent | 0bbd273e9714cce3813846802b4c8aeddbb65fe6 (diff) | |
| download | go-2b46cffe574432bd902e9e20fb00846cc2d2817d.tar.xz | |
syscall: improve linux SysProcAttr documentation
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/syscall/exec_linux.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index 791b263b2a..fb9a5dc907 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -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 |
