CL 627478 inadvertently returns a non-nil error
containing a syscall.Errno(0).
Change-Id: I1d6a9d0575d3ed651ddc02f30505437d0d266bb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/629515
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
func (p *Process) blockUntilWaitable() (bool, error) {
err := ignoringEINTR(func() error {
_, errno := wait6(_P_PID, p.Pid, syscall.WEXITED|syscall.WNOWAIT)
- return errno
+ if errno != 0 {
+ return errno
+ }
+ return nil
})
runtime.KeepAlive(p)
if err == syscall.ENOSYS {
psig := &siginfo[0]
err := ignoringEINTR(func() error {
_, _, errno := syscall.Syscall6(syscall.SYS_WAITID, _P_PID, uintptr(p.Pid), uintptr(unsafe.Pointer(psig)), syscall.WEXITED|syscall.WNOWAIT, 0, 0)
- return errno
+ if errno != 0 {
+ return errno
+ }
+ return nil
})
runtime.KeepAlive(p)
if err != nil {