InvocationConfiguration.ProcessTerminationTimeout Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a time span that enables signaling and handling of process termination (Ctrl+C, SIGINT, SIGTERM) via a CancellationToken that can be passed to a CommandLineAction during invocation.
public:
property Nullable<TimeSpan> ProcessTerminationTimeout { Nullable<TimeSpan> get(); void set(Nullable<TimeSpan> value); };
public TimeSpan? ProcessTerminationTimeout { get; set; }
member this.ProcessTerminationTimeout : Nullable<TimeSpan> with get, set
Public Property ProcessTerminationTimeout As Nullable(Of TimeSpan)
Property Value
The default is two seconds.
Remarks
If this property is set to null, the termination request isn't handled by System.CommandLine. In that case, the process is terminated immediately unless some other part of the program adds a handler.