summaryrefslogtreecommitdiff
path: root/src/pkg/exec/exec.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
commit28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch)
tree32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/exec/exec.go
parente836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff)
downloadgolang-28592ee1ea1f5cdffcf85472f9de0285d928cf12.tar.gz
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/exec/exec.go')
-rw-r--r--src/pkg/exec/exec.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go
index 935f24c21..5b988d5eb 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