win, watchdog: add flag to mark handler as disabled#10248
Closed
bzoz wants to merge 1 commit intonodejs:masterfrom
Closed
win, watchdog: add flag to mark handler as disabled#10248bzoz wants to merge 1 commit intonodejs:masterfrom
bzoz wants to merge 1 commit intonodejs:masterfrom
Conversation
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock.
addaleax
approved these changes
Dec 13, 2016
| static void* RunSigintWatchdog(void* arg); | ||
| static void HandleSignal(int signum); | ||
| #else | ||
| bool watchdog_disabled_; |
Member
There was a problem hiding this comment.
Tbh, I would find this a bit easier to read as watchdog_enabled_ with the logic flipped around
Contributor
Author
There was a problem hiding this comment.
It would be nicer, but with watchdog_disabled_ it is easier to tell if SigintWatchdogHelper::Start() is called for the first time and we have to register the handler or it is called after ::Stop() and we just have to flip the flag.
joaocgreis
pushed a commit
that referenced
this pull request
Dec 23, 2016
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
evanlucas
pushed a commit
that referenced
this pull request
Jan 3, 2017
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
evanlucas
pushed a commit
that referenced
this pull request
Jan 4, 2017
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins
pushed a commit
that referenced
this pull request
Jan 23, 2017
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins
pushed a commit
that referenced
this pull request
Jan 24, 2017
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Jan 31, 2017
Adds flags that marks WinCtrlCHandlerRoutine as disabled instead of removing it. Trying to remove the controller from the controller handle itself leads to deadlock. PR-URL: #10248 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
win, watchdog
Description of change
When calling
process.exitfromSIGHUPhandler current code tries to remove CTRL-C handler (WinCtrlCHandlerRoutine) by callingSetConsoleCtrlHandler. This however leads to deadlock, sinceSetConsoleCtrlHandlerblocks util all control handlers exits.This commit adds flags that marks
WinCtrlCHandlerRoutineas disabled instead of removing it.When libuv/libuv#1168 lands, toogether it will fix #10165
cc: @addaleax @bnoordhuis