mirror of
https://github.com/golang/go
synced 2024-09-29 19:14:28 -06:00
os: remove useless if from Wait on unix
Back in the day, Wait used to accept options argument. CL 4962042 fixed the issue of setting process.done flag when WNOHANG option was used. Later, CL 5688046 removed options argument from Wait, but did not remove pid1 != 0 check which was meant to be used with WNOHANG only. Remove the check, which is useless and also confusing. Change-Id: I73b9ef4a0dbe35466e659ca58b896d515ba86d02 Reviewed-on: https://go-review.googlesource.com/c/go/+/543736 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
00715d089d
commit
3548f9a01f
@ -48,9 +48,7 @@ func (p *Process) wait() (ps *ProcessState, err error) {
|
||||
if e != nil {
|
||||
return nil, NewSyscallError("wait", e)
|
||||
}
|
||||
if pid1 != 0 {
|
||||
p.setDone()
|
||||
}
|
||||
p.setDone()
|
||||
ps = &ProcessState{
|
||||
pid: pid1,
|
||||
status: status,
|
||||
|
Loading…
Reference in New Issue
Block a user