Commit a7042249 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

os/exec: simplify doc wording for cmd.StdoutPipe and cmd.StderrPipe

The existing text was hard to parse.
Shorten the sentences and simplify the text.

Change-Id: Ic16f486925090ea303c04e70969e5a4b27a60896
Reviewed-on: https://go-review.googlesource.com/c/go/+/198758Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent adc4d2cc
...@@ -606,8 +606,8 @@ func (c *closeOnce) close() { ...@@ -606,8 +606,8 @@ func (c *closeOnce) close() {
// standard output when the command starts. // standard output when the command starts.
// //
// Wait will close the pipe after seeing the command exit, so most callers // Wait will close the pipe after seeing the command exit, so most callers
// need not close the pipe themselves; however, an implication is that // need not close the pipe themselves. It is thus incorrect to call Wait
// it is incorrect to call Wait before all reads from the pipe have completed. // before all reads from the pipe have completed.
// For the same reason, it is incorrect to call Run when using StdoutPipe. // For the same reason, it is incorrect to call Run when using StdoutPipe.
// See the example for idiomatic usage. // See the example for idiomatic usage.
func (c *Cmd) StdoutPipe() (io.ReadCloser, error) { func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
...@@ -631,8 +631,8 @@ func (c *Cmd) StdoutPipe() (io.ReadCloser, error) { ...@@ -631,8 +631,8 @@ func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
// standard error when the command starts. // standard error when the command starts.
// //
// Wait will close the pipe after seeing the command exit, so most callers // Wait will close the pipe after seeing the command exit, so most callers
// need not close the pipe themselves; however, an implication is that // need not close the pipe themselves. It is thus incorrect to call Wait
// it is incorrect to call Wait before all reads from the pipe have completed. // before all reads from the pipe have completed.
// For the same reason, it is incorrect to use Run when using StderrPipe. // For the same reason, it is incorrect to use Run when using StderrPipe.
// See the StdoutPipe example for idiomatic usage. // See the StdoutPipe example for idiomatic usage.
func (c *Cmd) StderrPipe() (io.ReadCloser, error) { func (c *Cmd) StderrPipe() (io.ReadCloser, error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment