Function std.process.waitTimeout
Waits until either the process associated with pid
terminates or the
elapsed time exceeds the given timeout.
If the process terminates within the given duration it behaves exactly like
wait
, except that it returns a tuple (true, exit code)
.
If the process does not terminate within the given duration it will stop
waiting and return (false, 0)
The timeout may not exceed (uint
(~ 7 weeks, 17 hours).
This function is Windows-Only.
Returns
An Tuple!(bool, "terminated", int, "status")
.
Throws
ProcessException
on failure or on attempt to wait for detached process.
Example
See the spawnProcess
documentation.
See also
wait
, for a blocking function without timeout.
tryWait
, for a non-blocking function without timeout.
Authors
Lars Tandle Kyllingstad, Steven Schveighoffer, Vladimir Panteleev