v0.6 reliability: stray stty job after Ctrl+Z, reattach-repaint test race - #207
Merged
Merged
Conversation
After Ctrl+Z, zsh can run precmd before it has taken the terminal back. NMSh's hook ran 'stty -echo' as an ordinary job, which could then be stopped by SIGTTOU and stay in the user's job table as 'suspended (tty output)'. The hooks now change the echo mode through a helper that runs stty outside job control with SIGTTOU ignored for that call only, so the mode change is simply applied. This was the cause of the intermittent Ctrl+Z test failure (a second job made JOBCOUNT=1). Also fix a race in the reattach-repaint test: it detached before the fixture had installed its WINCH trap, so the reattach resize could arrive first. The fixture now reports when the trap is ready.
Owner
Author
|
CI ( |
Shells ended by service.close() write their spool afterwards, recreating the directory the test removed; wait for them first.
This was referenced Sep 29, 2026
Owner
Author
|
CI at current head |
raiseCatError
added this pull request to stack #210
September 29, 2026 10:19
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.
Closes #206
1. Product fix: stray
stty -echojob after Ctrl+Z (#206)jobsafter Ctrl+Z listed an extrasuspended (tty output)job.jobs -landpsshowed it wasstty -echoin stateTN, stopped by SIGTTOU.precmd/preexechooks ransttyas ordinary commands with job control on. Right after a job stops, zsh can runprecmdbefore it has taken the terminal back.sttythen runs as a separate job and is stopped when it changes terminal modes.nmsh_tty_echohelper runssttywithlocaloptions nomonitor(not a job) andlocaltraps+trap '' TTOU(SIGTTOU ignored for that call only), so the mode change is simply applied. The hooks' other global option changes are unchanged.JOBCOUNT=1, seen locally and in CI on Multiplexer interoperability: behavior matrix and contract tests #204). The stress run of 18 parallel Ctrl+Z test processes went from 6 of 18 failing to 0 of 18.2. Test fix: reattach-repaint race
reattach into a fullscreen app … repaint at the new size(from #128, failed once in CI on #204) detached the first window before the fixture had installed itsWINCHtrap, so the reattach resize could arrive first. The fixture now printsTRAP-READY, and the test waits for it. It passed 4/4 serially and 12/12 in parallel.Verification
git diff --checkare clean. The full suite passed 604/604 twice.shellSession,powerlevel10kandinProcessSessionClient(hook compatibility) passed 3/3.dev/master), so it's run withworkflow_dispatch; see the comment below.