File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
System.CommandLine.Tests/Invocation
System.CommandLine/Builder Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class CancelOnProcessTerminationTests
2020 private const int SIGTERM = 15 ;
2121
2222 [ LinuxOnlyTheory ]
23- [ InlineData ( SIGINT , Skip = "https://github.com/dotnet/command-line-api/issues/1206" ) ] // Console.CancelKeyPress
23+ [ InlineData ( SIGINT /* , Skip = "https://github.com/dotnet/command-line-api/issues/1206"*/ ) ] // Console.CancelKeyPress
2424 [ InlineData ( SIGTERM ) ] // AppDomain.CurrentDomain.ProcessExit
2525 public async Task CancelOnProcessTermination_cancels_on_process_termination ( int signo )
2626 {
@@ -151,7 +151,7 @@ public async Task CancelOnProcessTermination_timeout_on_cancel_processing(int? t
151151 childState . Should ( ) . Be ( ChildProcessWaiting ) ;
152152
153153 // Request termination
154- kill ( process . Id , SIGTERM ) . Should ( ) . Be ( 0 ) ;
154+ kill ( process . Id , /* SIGTERM*/ SIGINT ) . Should ( ) . Be ( 0 ) ;
155155
156156 // Verify the process terminates timely
157157 bool processExited = process . WaitForExit ( 10000 ) ;
Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ public static CommandLineBuilder CancelOnProcessTermination(
101101 {
102102 // Prevent our ProcessExit from intervene and block the exit
103103 AppDomain . CurrentDomain . ProcessExit -= processExitHandler ;
104- context . ExitCode = SIGINT_EXIT_CODE ;
105- ExitCode = SIGINT_EXIT_CODE ;
106104 Environment . Exit ( SIGINT_EXIT_CODE ) ;
107105 } , ( CancellationToken ) default ) ;
108106 }
You can’t perform that action at this time.
0 commit comments