Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Handle SIGTERM on OSX#10723

Merged
danmoseley merged 2 commits intodotnet:masterfrom
kouvel:SigTerm
Apr 8, 2017
Merged

Handle SIGTERM on OSX#10723
danmoseley merged 2 commits intodotnet:masterfrom
kouvel:SigTerm

Conversation

@kouvel
Copy link

@kouvel kouvel commented Apr 5, 2017

Fixes #7394

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the two nits. Thank you!

static void sigint_handler(int code, siginfo_t *siginfo, void *context);
static void sigquit_handler(int code, siginfo_t *siginfo, void *context);
#endif // !HAVE_MACH_EXCEPTIONS
static void sigterm_handler(int code, siginfo_t *siginfo, void *context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit - could you please move this line above all of the handler declarations? Then you can use single #if !HAVE_MACH_EXCEPTIONS

#endif // !HAVE_MACH_EXCEPTIONS
struct sigaction g_previous_sigterm;

static bool registered_sigterm_handler = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit - similar to what I've said above, could you please move the two variables above all the struct sigaction xxxx declarations above and use single #if !HAVE_MACH_EXCEPTIONS?

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@kouvel
Copy link
Author

kouvel commented Apr 5, 2017

@dotnet-bot test OSX10.12 x64 Checked Build and Test

2 similar comments
@kouvel
Copy link
Author

kouvel commented Apr 6, 2017

@dotnet-bot test OSX10.12 x64 Checked Build and Test

@kouvel
Copy link
Author

kouvel commented Apr 6, 2017

@dotnet-bot test OSX10.12 x64 Checked Build and Test

Koundinya Veluri added 2 commits April 6, 2017 11:24
@danmoseley
Copy link
Member

@dotnet-bot test OSX10.12 x64 Checked Build and Test (network)

@danmoseley danmoseley merged commit 4d6398e into dotnet:master Apr 8, 2017
@kouvel kouvel deleted the SigTerm branch April 9, 2017 02:31
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
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