Graceful Cancellation & ExitedCommandEvent? #224
Unanswered
mikoskinen
asked this question in
Q&A
Replies: 1 comment
-
Hi. This is indeed by design. When a command execution gets canceled, an exception gets thrown, so it never really reaches the point where it checks the process exit code, etc. In case with CliWrap/CliWrap/EventStream/PushEventStreamCommandExtensions.cs Lines 68 to 71 in c4d5f94 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We've been using CliWrap for a while now and it has been working nicely. The only problem has been with some of the processes not closing when the main app is killed so we're looking if the Graceful Cancellation -feature could help us.
We're running the executables using:
await runCmd.Observe(Console.OutputEncoding, Console.OutputEncoding, forcefulCts.Token, flow.CancellationToken).ForEachAsync
Based on the preliminary testing we noticed that if we use the graceful CancellationToken to exit the process, we are not receiving the ExitedCommandEvent.
Is this by design? Or should we still receive ExitedCommandEvent when using Graceful Cancellation?
Beta Was this translation helpful? Give feedback.
All reactions