Repository navigation
WIP: wave-3 remainder — jobs/coproc/carrier batch (#1853, #1869) - #1879
Merged
Merged
Conversation
A signal death in the stream's last command never printed its job notice: report_pending_signal_notices only ran at the next top-level command boundary in execute_ast, and at EOF there is no next command. GNU prints without a following command - wait_for calls notify_and_cleanup for the dead foreground job as the wait completes (jobs.c:3385), and maybe_print_job_notifications prints whenever the shell is not interactive (jobs.c:4723-4728), background deaths included. finish_shell (the script-file/stdin/-c drivers' shared finish path) now replays the reap + report half of the boundary step once at stream end, before run_exit_trap_with_status, matching GNU's order (notice precedes the EXIT trap). The exec-replacement -c final unit never reaches finish_shell, so that silent shape stays silent. Pins: tests/issue1853_last_line_signal_notice_regressions.rs - script last line, stdin last line, background death during the last command, EXIT-trap ordering, followed-line exactly-once control, -c brace-group final unit. 4 of 6 fail on pristine master; all pass here. GNU expectations verified against bash 5.3.20 script-file probes.
…sh#1869) Adjudication from reproduction on current master (bb360a9), against GNU bash 5.3.20 script-file probes: - Claim 1 (group route steals the first simple-command word as the coproc NAME): the parse is already unified - parse_coproc_command implements the parse.y:1125-1175 rule route-independently (a WORD is a NAME only before a compound/shell command). With a settle window the group, function-body and top-level forms are byte-identical: FC2 stays unbound, fds bind as COPROC, the child reports 'FC2: command not found'. What the recon observation saw as silence is a stderr-lifetime mechanism (coproc child stderr rides a pipe + forwarder thread whose read end dies with the parent), not a binding difference - recorded with deterministic probes in the cluster REPORT as a separate residual. - Claim 2 (multi-line group, coproc first line, reports 'coproc: command not found' + stray '}'): the brace-fold defect family fixed for #1625 and merged in PR #1866 (03f7271 + bbf3b53) - the fold ending one brace early is exactly the stray-'}' mechanism. Broad context matrices on current master (pipeline, subshell, comsub, case, loops, if-condition, time, negation) show no reproduction. These pins lock both shapes so the routes cannot drift apart again. No product change.
caomengxuan666
marked this pull request as ready for review
October 27, 2026 15:41
This was referenced Oct 27, 2026
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.
WIP: wave-3 remainder — jobs/coproc/carrier batch.
Fixes #1853
Refs #1869
#1853 (commit 7c7b6b5)
Signal death in a stream's last command never printed its job notice (the boundary flush in execute_ast needs a NEXT command).
finish_shellnow replays reap + report once at stream end, before the EXIT trap — GNU: wait_for notify_and_cleanup (jobs.c:3385), maybe_print_job_notifications (jobs.c:4723-4728). Pins intests/issue1853_last_line_signal_notice_regressions.rs(4/6 fail on pristine, 6/6 pass here).#1869 (commit 634f612, tests only)
Reproduction on current master shows the grammar is already unified (parse.y:1125-1175 rule in parse_coproc_command is route-independent; the multi-line misreport was the #1625 fold family, cured by merged PR #1866). Guard pins in
tests/issue1869_coproc_group_grammar_regressions.rslock group/top-level/function routes together. The residual the recon observation actually showed — coproc child diagnostics lost when the parent exits promptly (stderr pipe + forwarder lifetime) — is documented with deterministic probes in the cluster REPORT as a separate mechanism, not grammar.Carrier-host adjudication (c)
Landed on PR #1812's own branch (commit 27bddbf on fix9/1766-forward): nameref alias cells are dropped from the host env map's base clone by the NAMEREF_VARS attribute set in
invoke_host_external_command; PR #1812's pins now run 16/16. #1812 stays draft for the main session's merge call.