mirror of
https://github.com/golang/go
synced 2024-11-26 09:08:07 -07:00
os: use ignoringEINTR2 in (*Process).pidWait
This was missed in CL 627479. Change-Id: Ibcd511573c330bf782fe6a8a50d56bb70aedf3c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/629915 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
dce30a1920
commit
c94a9fdf65
@ -63,17 +63,12 @@ func (p *Process) pidWait() (*ProcessState, error) {
|
|||||||
var (
|
var (
|
||||||
status syscall.WaitStatus
|
status syscall.WaitStatus
|
||||||
rusage syscall.Rusage
|
rusage syscall.Rusage
|
||||||
pid1 int
|
|
||||||
e error
|
|
||||||
)
|
)
|
||||||
for {
|
pid1, err := ignoringEINTR2(func() (int, error) {
|
||||||
pid1, e = syscall.Wait4(p.Pid, &status, 0, &rusage)
|
return syscall.Wait4(p.Pid, &status, 0, &rusage)
|
||||||
if e != syscall.EINTR {
|
})
|
||||||
break
|
if err != nil {
|
||||||
}
|
return nil, NewSyscallError("wait", err)
|
||||||
}
|
|
||||||
if e != nil {
|
|
||||||
return nil, NewSyscallError("wait", e)
|
|
||||||
}
|
}
|
||||||
p.pidDeactivate(statusDone)
|
p.pidDeactivate(statusDone)
|
||||||
return &ProcessState{
|
return &ProcessState{
|
||||||
|
Loading…
Reference in New Issue
Block a user