diff options
| author | Russ Cox <rsc@golang.org> | 2011-06-14 10:49:34 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-06-14 10:49:34 -0400 |
| commit | 4d0f2e9195304e595c706de381d4a59d6f6f72bf (patch) | |
| tree | 040186f9d0bf480d9a3e2ae61a771a8f07c723e7 /src/pkg/exec/exec.go | |
| parent | 371aa14e0606f0a34a89330be1a34e908603e6c2 (diff) | |
| download | go-4d0f2e9195304e595c706de381d4a59d6f6f72bf.tar.xz | |
syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd
R=r, bradfitz, alex.brainman, borman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4607046
Diffstat (limited to 'src/pkg/exec/exec.go')
| -rw-r--r-- | src/pkg/exec/exec.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go index 935f24c217..5b988d5eb4 100644 --- a/src/pkg/exec/exec.go +++ b/src/pkg/exec/exec.go @@ -12,6 +12,7 @@ import ( "io" "os" "strconv" + "syscall" ) // Error records the name of a binary that failed to be be executed @@ -62,6 +63,10 @@ type Cmd struct { Stdout io.Writer Stderr io.Writer + // SysProcAttr holds optional, operating system-specific attributes. + // Run passes it to os.StartProcess as the os.ProcAttr's Sys field. + SysProcAttr *syscall.SysProcAttr + // Process is the underlying process, once started. Process *os.Process @@ -225,6 +230,7 @@ func (c *Cmd) Start() os.Error { Dir: c.Dir, Files: c.childFiles, Env: c.envv(), + Sys: c.SysProcAttr, }) if err != nil { return err |
