We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d82e48d commit 873530bCopy full SHA for 873530b
src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs
@@ -105,8 +105,12 @@ public static CommandLineBuilder CancelOnProcessTermination(
105
}, (CancellationToken)default);
106
}
107
};
108
- Console.CancelKeyPress += consoleHandler;
109
- AppDomain.CurrentDomain.ProcessExit += processExitHandler;
+
+ if (!(cancelationProcessingTimeout! > TimeSpan.Zero))
110
+ {
111
+ Console.CancelKeyPress += consoleHandler;
112
+ AppDomain.CurrentDomain.ProcessExit += processExitHandler;
113
+ }
114
115
116
try
0 commit comments