[release/10.0] Re-add default value on ProcessTerminationTimeout #2674
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Customer Impact
The preview 7 and later releases of System.CommandLine included an API change that resulted in default cancellation behaviors for System.CommandLine-based applications changing. in preview6 and earlier, the library was configured so that Ctrl+C would cause a
System.OperationCanceledExceptionto be thrown, giving user code a simple hook to catch and react to that. Preview 7 and later dropped this behavior unintentionally, causing some users to report that their cleanup/cancellation code was no longer being triggered.How was it found
An external user, @mpatkisson, discovered the issue, did detailed investigation and analysis in #2671, and then contributed a fix in #2672.
Risk
Low. The existing cancellation mechanisms in use are under test, but we did not have a test that covers the documented 2s cancellation default behavior, to ensure we didn't regress it. This has been manually tested, and we will shortly add a test to the repo to prevent regressions.