]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: document ProcessState available after a call to Wait or Run
authorhopehook <hopehook.com@gmail.com>
Mon, 3 Oct 2022 09:49:08 +0000 (17:49 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 7 Oct 2022 02:16:49 +0000 (02:16 +0000)
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>
src/os/exec/exec.go

index e891ddca5a6afb5912cca4711ed529e1acf624c6..aa601b6ccc62ca051088b686c730c7c018b7715a 100644 (file)
@@ -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