os,syscall: fix plan 9 build
NewFile take uintptr
make syscall.ProcAttr.Files be []uintptr
R=rsc
CC=golang-dev
https://golang.org/cl/5656073
diff --git a/src/pkg/os/exec_plan9.go b/src/pkg/os/exec_plan9.go
index 08f16b8..b725aeb 100644
--- a/src/pkg/os/exec_plan9.go
+++ b/src/pkg/os/exec_plan9.go
@@ -20,18 +20,10 @@
Sys: attr.Sys,
}
- // 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 e != nil {
return nil, &PathError{"fork/exec", name, e}