aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exec/exec.go
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2011-03-21 11:25:00 -0300
committerGustavo Niemeyer <gustavo@niemeyer.net>2011-03-21 11:25:00 -0300
commit2187f43e63a4a9b02a3ede7ba88312cb11d38dac (patch)
treeb7687fee49eea2cb7737cd4de915796be391cfca /src/pkg/exec/exec.go
parentb889a9f94174823fc68c1dfe340750165ab4019c (diff)
downloadgo-2187f43e63a4a9b02a3ede7ba88312cb11d38dac.tar.xz
exec: document dir option for Run
R=golang-dev, bradfitzwork, rsc1, peterGo CC=golang-dev https://golang.org/cl/4271056
Diffstat (limited to 'src/pkg/exec/exec.go')
-rw-r--r--src/pkg/exec/exec.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go
index 0a364da121..44e3b65bec 100644
--- a/src/pkg/exec/exec.go
+++ b/src/pkg/exec/exec.go
@@ -75,17 +75,19 @@ func modeToFiles(mode, fd int) (*os.File, *os.File, os.Error) {
// Run starts the named binary running with
// arguments argv and environment envv.
+// If the dir argument is not empty, the child changes
+// into the directory before executing the binary.
// It returns a pointer to a new Cmd representing
// the command or an error.
//
-// The parameters stdin, stdout, and stderr
+// The arguments stdin, stdout, and stderr
// specify how to handle standard input, output, and error.
// The choices are DevNull (connect to /dev/null),
// PassThrough (connect to the current process's standard stream),
// Pipe (connect to an operating system pipe), and
// MergeWithStdout (only for standard error; use the same
// file descriptor as was used for standard output).
-// If a parameter is Pipe, then the corresponding field (Stdin, Stdout, Stderr)
+// If an argument is Pipe, then the corresponding field (Stdin, Stdout, Stderr)
// of the returned Cmd is the other end of the pipe.
// Otherwise the field in Cmd is nil.
func Run(name string, argv, envv []string, dir string, stdin, stdout, stderr int) (c *Cmd, err os.Error) {