`stdlib::child::Windows::ChildImp::try_wait` shouldn't fail on timeout of GetQueuedCompletionStatus
bmc-msft opened this issue · 0 comments
Per the documentation on GetQueuedCompletionStatus:
The number of milliseconds that the caller is willing to wait for a completion packet to appear at the completion port. If a completion packet does not appear within the specified time, the function times out, returns FALSE, and sets *lpOverlapped to NULL.
As such, calling wait_imp(0)
as shown here:
command-group/src/stdlib/child/windows.rs
Line 91 in b704729
Which calls GetQueuedCompletionStatus
here:
command-group/src/stdlib/child/windows.rs
Lines 72 to 80 in b704729
A timeout will result in FALSE, which results in an Err.
This is contrary to normal behavior for try_wait. I would expect the try_wait
to not fail on GetQueuedCompletionStatus
timeout, but instead act like underlying impl of try_wait
and return an Ok(None), or handle non-timeout errors specifically.