Skip to content
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

Merged
merged 8 commits into from
Mar 28, 2019
Merged

React to SIGTERM exit code change #1289

merged 8 commits into from
Mar 28, 2019

Conversation

Tratcher
Copy link
Member

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.

@Tratcher Tratcher added this to the 3.0.0-preview4 milestone Mar 20, 2019
@Tratcher Tratcher self-assigned this Mar 20, 2019
@Tratcher
Copy link
Member Author

@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.

@tmds
Copy link
Member

tmds commented Mar 21, 2019

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.
coreclr did not change regarding unhandled exceptions and still expects the application to take care of that.

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.

@Tratcher Tratcher marked this pull request as ready for review March 21, 2019 15:24
@Tratcher Tratcher requested a review from JunTaoLuo March 21, 2019 15:24
@Tratcher
Copy link
Member Author

bump

Copy link

@jkotalik jkotalik left a 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.

Copy link

@JunTaoLuo JunTaoLuo left a 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.

Copy link

@JunTaoLuo JunTaoLuo left a 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.

@Tratcher Tratcher merged commit 0bc7c9f into master Mar 28, 2019
@Tratcher Tratcher deleted the tratcher/shutdown branch March 28, 2019 22:47
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Feb 28, 2020
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 2, 2020
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 11, 2020
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 25, 2020
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 27, 2020
@ghost ghost locked as resolved and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants