mirror of
https://github.com/golang/go
synced 2024-11-24 21:00:09 -07:00
os: fix WNOHANG Waitmsg
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4962042
This commit is contained in:
parent
9ef17990c2
commit
1952eb5010
@ -38,7 +38,8 @@ func (p *Process) Wait(options int) (w *Waitmsg, err Error) {
|
||||
if e != 0 {
|
||||
return nil, NewSyscallError("wait", e)
|
||||
}
|
||||
if options&WSTOPPED == 0 {
|
||||
// With WNOHANG pid is 0 if child has not exited.
|
||||
if pid1 != 0 && options&WSTOPPED == 0 {
|
||||
p.done = true
|
||||
}
|
||||
w = new(Waitmsg)
|
||||
|
Loading…
Reference in New Issue
Block a user