The wait was there, because we discovered that we could not remove
finished process executable without the wait on Windows XP. But
Windows XP is not supported by Go. Maybe we do not need the wait
with modern Windows versions. Remove the sleep.
Fixes #25965
Change-Id: I02094abee3592ce4fea98eaff9d15137dc54dc81
Reviewed-on: https://go-review.googlesource.com/c/145221
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
return nil, NewSyscallError("GetProcessTimes", e)
}
p.setDone()
- // NOTE(brainman): It seems that sometimes process is not dead
- // when WaitForSingleObject returns. But we do not know any
- // other way to wait for it. Sleeping for a while seems to do
- // the trick sometimes. So we will sleep and smell the roses.
- defer time.Sleep(5 * time.Millisecond)
defer p.Release()
return &ProcessState{p.Pid, syscall.WaitStatus{ExitCode: ec}, &u}, nil
}