summaryrefslogtreecommitdiff
path: root/src/pkg/os/exec_posix.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-07-08 09:16:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-07-08 09:52:32 +0200
commit85cafef129c3826b0c5e290c89cfc7251fba43d5 (patch)
treee59b124753eb1eec194ec682a7815c401388f10d /src/pkg/os/exec_posix.go
parent67c487c4bd0fc91c2ce5972886d108e0d2939064 (diff)
downloadgolang-85cafef129c3826b0c5e290c89cfc7251fba43d5.tar.gz
Imported Upstream version 2011.07.07
Diffstat (limited to 'src/pkg/os/exec_posix.go')
-rw-r--r--src/pkg/os/exec_posix.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pkg/os/exec_posix.go b/src/pkg/os/exec_posix.go
index 7dfcdd486..e2097700e 100644
--- a/src/pkg/os/exec_posix.go
+++ b/src/pkg/os/exec_posix.go
@@ -35,16 +35,9 @@ func StartProcess(name string, argv []string, attr *ProcAttr) (p *Process, err E
if sysattr.Env == nil {
sysattr.Env = Environ()
}
- // Create array of integer (system) fds.
- intfd := make([]int, len(attr.Files))
- for i, f := range attr.Files {
- if f == nil {
- intfd[i] = -1
- } else {
- intfd[i] = f.Fd()
- }
+ for _, f := range attr.Files {
+ sysattr.Files = append(sysattr.Files, f.Fd())
}
- sysattr.Files = intfd
pid, h, e := syscall.StartProcess(name, argv, sysattr)
if iserror(e) {