-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React to SIGTERM exit code change #1289
Conversation
@tmds Generic Host is structured a bit differently and the lifetime doesn't have as clear a picture on if the application is exiting gracefully or not. This change suppresses the 143 exit code and does not appear to affect the exit code for unhandled exceptions. |
coreclr change was on SIGTERM to have 143 exit code by default. fyi, System.CommandLine library catches unhandled exceptions and turns those into ExitCode 1: https://github.com/dotnet/command-line-api/blob/979e30b80482872354e279c67f79d3e94c11380a/src/System.CommandLine/Invocation/InvocationExtensions.cs#L134-L164. |
bump |
src/Hosting/test/testassets/Microsoft.Extensions.Hosting.TestApp/Program.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with copying files for now, but this division in hosting between AspNetCore/Extensions isn't fun.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of duplicating the code everywhere especially since now the types live in both namespaces. If this is only needed for testing, is it possible to move all the integration test code to the test project and make it internal there? If the intention is to ship this as part of extensions, I'd like to think a bit more about how support the type in both extensions and aspnetcore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two minor outstanding comments but otherwise this looks good.
ca08c85
to
503b6f9
Compare
Commit migrated from dotnet/extensions@0bc7c9f
Commit migrated from dotnet/extensions@0bc7c9f
Commit migrated from dotnet/extensions@0bc7c9f
Commit migrated from dotnet/extensions@0bc7c9f
Commit migrated from dotnet/extensions@0bc7c9f
dotnet/aspnetcore#6526
This required copying quite a bit of functional test infrastructure, though I was able to simplify it quite a bit. We may be able to refactor these so the ones in aspnetcore derive from these, but I don't know if it's worth it.