From: hopehook Date: Mon, 3 Oct 2022 09:49:08 +0000 (+0800) Subject: os/exec: document ProcessState available after a call to Wait or Run X-Git-Tag: go1.20rc1~714 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fdea8e21708e9ed04498a7f7b68cbee43005d58d;p=gostls13.git 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 TryBot-Result: Gopher Robot Reviewed-by: Rob Pike Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Ian Lance Taylor --- 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