WaitForExitOrTimeoutAsync(CancellationToken) Method

Definition

Asynchronously waits for the process to exit or a specified timeout period elapses.

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public Task<ProcessResult> WaitForExitOrTimeoutAsync(CancellationToken cancellationToken)

Parameters

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ProcessResult>
A task that represents the asynchronous operation. The result contains the plain ProcessResult when the method completes; redirected output is not captured by this method — use CaptureBufferedResultAsync(CancellationToken, Nullable<Int64>, Nullable<Int64>) for buffered output.