diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-07-08 09:16:22 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-07-08 09:52:32 +0200 |
| commit | 85cafef129c3826b0c5e290c89cfc7251fba43d5 (patch) | |
| tree | e59b124753eb1eec194ec682a7815c401388f10d /src/pkg/syscall/exec_windows.go | |
| parent | 67c487c4bd0fc91c2ce5972886d108e0d2939064 (diff) | |
| download | golang-85cafef129c3826b0c5e290c89cfc7251fba43d5.tar.gz | |
Imported Upstream version 2011.07.07
Diffstat (limited to 'src/pkg/syscall/exec_windows.go')
| -rw-r--r-- | src/pkg/syscall/exec_windows.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/syscall/exec_windows.go b/src/pkg/syscall/exec_windows.go index 96a01e767..e8b540ad1 100644 --- a/src/pkg/syscall/exec_windows.go +++ b/src/pkg/syscall/exec_windows.go @@ -121,11 +121,11 @@ func createEnvBlock(envv []string) *uint16 { return &utf16.Encode([]int(string(b)))[0] } -func CloseOnExec(fd int) { - SetHandleInformation(int32(fd), HANDLE_FLAG_INHERIT, 0) +func CloseOnExec(fd Handle) { + SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0) } -func SetNonblock(fd int, nonblocking bool) (errno int) { +func SetNonblock(fd Handle, nonblocking bool) (errno int) { return 0 } @@ -220,7 +220,7 @@ func joinExeDirAndFName(dir, p string) (name string, err int) { type ProcAttr struct { Dir string Env []string - Files []int + Files []Handle Sys *SysProcAttr } @@ -290,14 +290,14 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid, handle int, defer ForkLock.Unlock() p, _ := GetCurrentProcess() - fd := make([]int32, len(attr.Files)) + fd := make([]Handle, len(attr.Files)) for i := range attr.Files { if attr.Files[i] > 0 { - err := DuplicateHandle(p, int32(attr.Files[i]), p, &fd[i], 0, true, DUPLICATE_SAME_ACCESS) + err := DuplicateHandle(p, Handle(attr.Files[i]), p, &fd[i], 0, true, DUPLICATE_SAME_ACCESS) if err != 0 { return 0, 0, err } - defer CloseHandle(int32(fd[i])) + defer CloseHandle(Handle(fd[i])) } } si := new(StartupInfo) @@ -317,7 +317,7 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid, handle int, if err != 0 { return 0, 0, err } - defer CloseHandle(pi.Thread) + defer CloseHandle(Handle(pi.Thread)) return int(pi.ProcessId), int(pi.Process), 0 } |
