aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-10-03 17:49:08 +0800
committerGopher Robot <gobot@golang.org>2022-10-07 02:16:49 +0000
commitfdea8e21708e9ed04498a7f7b68cbee43005d58d (patch)
tree75fa89f61062a571b067b603799361248f5e2272 /src/os/exec
parent2837ffe8d8a48cb321842721a8531ed870ace1d3 (diff)
downloadgo-fdea8e21708e9ed04498a7f7b68cbee43005d58d.tar.xz
os/exec: document ProcessState available after a call to Wait or Run
Wait or Run will populate its ProcessState when the command completes. Fixes #56002. Change-Id: I21547431f5d2d3e0fc0734fd1705421a0ac4209c Reviewed-on: https://go-review.googlesource.com/c/go/+/437996 Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/os/exec')
-rw-r--r--src/os/exec/exec.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index e891ddca5a..aa601b6ccc 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -214,8 +214,9 @@ type Cmd struct {
// Process is the underlying process, once started.
Process *os.Process
- // ProcessState contains information about an exited process,
- // available after a call to Wait or Run.
+ // ProcessState contains information about an exited process.
+ // If the process was started successfully, Wait or Run will
+ // populate its ProcessState when the command completes.
ProcessState *os.ProcessState
ctx context.Context // nil means none