diff options
Diffstat (limited to 'src/pkg/os/exec_windows.go')
-rw-r--r-- | src/pkg/os/exec_windows.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/os/exec_windows.go b/src/pkg/os/exec_windows.go index bac33b908..5b432d398 100644 --- a/src/pkg/os/exec_windows.go +++ b/src/pkg/os/exec_windows.go @@ -10,17 +10,17 @@ import ( ) func (p *Process) Wait(options int) (w *Waitmsg, err Error) { - s, e := syscall.WaitForSingleObject(int32(p.handle), syscall.INFINITE) + s, e := syscall.WaitForSingleObject(syscall.Handle(p.handle), syscall.INFINITE) switch s { case syscall.WAIT_OBJECT_0: break case syscall.WAIT_FAILED: return nil, NewSyscallError("WaitForSingleObject", e) default: - return nil, ErrorString("os: unexpected result from WaitForSingleObject") + return nil, NewError("os: unexpected result from WaitForSingleObject") } var ec uint32 - e = syscall.GetExitCodeProcess(int32(p.handle), &ec) + e = syscall.GetExitCodeProcess(syscall.Handle(p.handle), &ec) if e != 0 { return nil, NewSyscallError("GetExitCodeProcess", e) } @@ -31,7 +31,7 @@ func (p *Process) Wait(options int) (w *Waitmsg, err Error) { func (p *Process) Signal(sig Signal) Error { switch sig.(UnixSignal) { case SIGKILL: - e := syscall.TerminateProcess(int32(p.handle), 1) + e := syscall.TerminateProcess(syscall.Handle(p.handle), 1) return NewSyscallError("TerminateProcess", e) } return Errno(syscall.EWINDOWS) @@ -41,7 +41,7 @@ func (p *Process) Release() Error { if p.handle == -1 { return EINVAL } - e := syscall.CloseHandle(int32(p.handle)) + e := syscall.CloseHandle(syscall.Handle(p.handle)) if e != 0 { return NewSyscallError("CloseHandle", e) } |