mirror of
https://github.com/golang/go.git
synced 2025-11-08 04:31:01 +00: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue