[−][src]Trait process_control::Timeout
A temporary wrapper for a process timeout.
Associated Types
Loading content...Required methods
#[must_use]pub fn strict_errors(self) -> Self
[src]
Causes wait
to never suppress an error.
Typically, errors terminating the process will be ignored, as they are often less important than the result. However, when this method is called, those errors will be returned as well.
#[must_use]pub fn terminating(self) -> Self
[src]
Causes the process to be terminated if it exceeds the time limit.
Process identifier reuse by the system will be mitigated. There should never be a scenario that causes an unintended process to be terminated.
pub fn wait(self) -> Result<Option<Self::Result>>
[src]
Runs the process to completion, aborting if it exceeds the time limit.
At least one thread will be created to wait on the process without blocking the current thread.
If the time limit is exceeded before the process finishes, Ok(None)
will be returned. However, the process will not be terminated in that
case unless terminating
is called beforehand. It is recommended to
always call that method to allow system resources to be freed.
The stdin handle to the process, if it exists, will be closed before waiting. Otherwise, the process would assuredly time out when reading from that pipe.
This method cannot guarantee that the same io::ErrorKind
variants
will be returned in the future for the same types of failures. Allowing
these breakages is required to enable calling Child::kill
internally.