Repository navigation
fix(libkernel): let raise and kill return 0 for ignored signals - #8467
Merged
oneandonlydean merged 1 commit intoOct 20, 2026
Merged
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
A signal that is ignored is forgotten when it is sent: the call succeeds (sys/kern/kern_sig.c:2178-2187). That covers SIG_IGN and the signals whose default action is SA_IGNORE, SIGURG, SIGCONT, SIGCHLD, SIGIO, SIGWINCH and SIGINFO (kern_sig.c:205-240); SIGCONT stays pending while blocked. The guest failed with EINVAL for every such signal that has no host equivalent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
xXPBSXx
force-pushed
the
fix/raise-default-ignored-signals
branch
from
October 20, 2026 13:35
f674de4 to
12ec674
Compare
11 tasks done
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.
What
raise_nid_postfix(andkillon the own process, which calls it) failed withEINVALfor a signal without a host equivalent and without a guest handler, also when the guest had set it toSIG_IGN. FreeBSD 11.4 definesSIGURG,SIGCONT,SIGCHLD,SIGIO,SIGWINCHandSIGINFOas ignored by default (sys/kern/kern_sig.c:205-240), so sending one succeeds, andtdsendsignalforgets such a signal at once, also when it is blocked (kern_sig.c:2178-2187), exceptSIGCONT, which stays pending while blocked. A signal set toSIG_IGNis forgotten the same way. All of these now return 0. Signals whose default action ends the process, such asSIGUSR1, are unchanged.Fixes #8466
Overlap: the open signal PRs #3986, #6044 and #7201 rewrite large parts of
Signals.cppand conflict with this change (git merge-tree: 3, 26 and 25 conflicts); the PRs #8407, #8411 and #8414 are clean against it. Whichever lands second rebases.pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main 44e3389 + this commit:
guest_signals:Exit code 0xc0000409withSystem/src/Signals.cpptaken back to main (new test lines kept), passes with the change (3 of 3 runs). New cases:raiseandkill(getpid(), ...)return 0 for 16, 19, 20, 23, 28 and 29 witherrnountouched and no handler called; with those signals blocked, 16, 20, 23, 28 and 29 are not pending afterwards; signal 30 set toSIG_IGNreturns 0 fromraiseandkill, also blocked, without becoming pending.guest_sigtimedwait,guest_itimer,guest_itimer_pending_default,guest_kill,guest_signal_sets,guest_sigaltstack,guest_getitimerpass.python tools/check_conventions.py --base upstream/main: passes.pthread_killto another thread (it still remembers such a signal as pending). No title is known to send these signals to itself.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code