aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-14 23:48:34 -0400
committerRuss Cox <rsc@golang.org>2015-07-15 05:11:37 +0000
commitd000e8742a173aa0659584aa01b7ba2834ba28ab (patch)
tree4eafe8cbd0c45fd1e4ffb1142f341fa75e7c522e
parent3d3a0169bfe4a1cc515ca7a781d4930c6015c57c (diff)
downloadgo-d000e8742a173aa0659584aa01b7ba2834ba28ab.tar.gz
go-d000e8742a173aa0659584aa01b7ba2834ba28ab.zip
os/exec: document that Cmd.Wait waits for stdin I/O
Fixes #10338. Change-Id: Ib86cb9a6c694b1e442a9957153c7ca38a7d11c3e Reviewed-on: https://go-review.googlesource.com/12232 Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/os/exec/exec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index 1f5fb6e39c..fcc37870ed 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -363,6 +363,10 @@ func (e *ExitError) Error() string {
// error is of type *ExitError. Other error types may be
// returned for I/O problems.
//
+// If c.Stdin is not an *os.File, Wait also waits for the I/O loop
+// copying from c.Stdin into the process's standard input
+// to complete.
+//
// Wait releases any resources associated with the Cmd.
func (c *Cmd) Wait() error {
if c.Process == nil {