Repository navigation
fix(signals): note_console_ctrl_c + persist exit_code on untrapped fatal signal; kill interrupted externals - #1447
Merged
caomengxuan666 merged 1 commit intoOct 23, 2026
Conversation
kill::note_console_ctrl_c() queues signal 2 on Windows; trap_exec writes executor.exit_code before unwinding with 128+sig; external wait kill+wait on signal interrupt so children do not linger.
Member
|
Reviewed — clean. The child reap on aborted wait-slice is a real fix on top of the API addition, and the Unix no-double-dispatch note saves the next person a subtle bug. Merged; the niubash host half (#542) follows once the pin carries this. |
Member
|
Follow-up: your PR's own CI couldn't run (first-contribution workflow gate on our side — that's ours, not yours), so validation happened on master after the merge: the full battery just passed on the merge result. The child reap on aborted wait-slice and the exit_code-before-unwind fixes are both confirmed good. The niubash host half (#542) follows once our vendored pin carries this — we'll ping on that PR. |
This was referenced Oct 24, 2026
Closed
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.
Summary
Engine had no hook for the Windows host console Ctrl-C flag; untrapped fatal signals did not write
executor.exit_codebefore unwinding; interrupted external waits could leave children.Changes
kill::note_console_ctrl_c()→queue_self_signal(2)on Windows (no-op elsewhere).trap_exec: writeself.exit_codebeforeErr(ExitCode(128+sig)).external_inner: on signal-interrupted wait,child.kill()+wait()then unwind.Host companion: unixwin/niubash#542 (
fix/console-ctrl-c-inject-self-signal). Related open: #1250, #1034.Niubash defect log D8 (2026-10-23).