Repository navigation
Improve signal handling of test servers on Windows - #5218
Merged
Merged
Conversation
bagder
approved these changes
Apr 11, 2020
Member
Author
|
TODO before merge: include reasoning in PR description in |
mback2k
force-pushed
the
win-test-server-signal-handling
branch
3 times, most recently
from
April 12, 2020 13:04
ca490a1 to
4f27246
Compare
Avoid code duplication to prepare for portability enhancements.
Forward CTRL events as signals to existing signal event handler.
Forward Window events as signals to existing signal event handler.
mback2k
force-pushed
the
win-test-server-signal-handling
branch
from
April 12, 2020 16:38
4f27246 to
ac1e206
Compare
1 task done
vszakats
added a commit
that referenced
this pull request
Aug 6, 2026
In year 2020 the Unixy signal handler received a `logmsg()` call to log the signal number, but at the same time it already saved it to a global variable and logged it on exit, meaning this extra `logmsg()` was redundant. Because `logmsg()` is not signal-safe, this call was replaced in 2025 with signal-safe logging, but without the signal number, while also adding complexity, spent on trying to open the log file and handle errors. All for nothing, because the signal number was logged all along. This patch removes all this, and simplifies it to a single, signal-safe `write()` to STDERR to say that the signal handler triggered. This is also non-critical, but may help debugging. Also: point the POSIX documentation to the 2004 revision, which has a shorter list of safe functions. (was: 2018) Follow-up to e95f509 #16852 Follow-up to 9869f6d #5218 Closes #22507
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.
Avoid code duplication to prepare for portability enhancements.
Forward CTRL events as signals to existing signal event handler.
Forward Window events as signals to existing signal event handler.
Reasoing: