diff options
Diffstat (limited to 'libgo/go/os/exec_unix.go')
-rw-r--r-- | libgo/go/os/exec_unix.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/os/exec_unix.go b/libgo/go/os/exec_unix.go index 242bda702c6..3dcac414c5a 100644 --- a/libgo/go/os/exec_unix.go +++ b/libgo/go/os/exec_unix.go @@ -38,7 +38,7 @@ func (p *Process) Wait(options int) (w *Waitmsg, err error) { options ^= WRUSAGE } pid1, e := syscall.Wait4(p.Pid, &status, options, rusage) - if e != 0 { + if e != nil { return nil, NewSyscallError("wait", e) } // With WNOHANG pid is 0 if child has not exited. @@ -57,8 +57,8 @@ func (p *Process) Signal(sig Signal) error { if p.done { return errors.New("os: process already finished") } - if e := syscall.Kill(p.Pid, int(sig.(UnixSignal))); e != 0 { - return Errno(e) + if e := syscall.Kill(p.Pid, int(sig.(UnixSignal))); e != nil { + return e } return nil } |