Repository navigation
Conversation
|
Reviewed at 39e34c4 and verified on a disposable Omarchy worker (Ghostty 1.3.1, bash 5.3.15, Hyprland 0.56.2) with a screensaver on each of two monitors. The bug is real, and this fixes it. I added one line to Tests: The change is the size of the problem: one line in the handler and a regression test. I linked #8386 too, an earlier report of the same recursion. #6813 rewrites this script's shutdown more broadly and would remove the same re-entry. The two conflict, and which to land is the maintainer's call. Second opinion: none. Classification was agreed earlier by deepseek-v4p1-flash, but the code review by Codex Medium did not run: the reviewer is reachable, and today's review budget was spent. This review is one model's, Claude Opus 5.5. The pull request carries |
|
This pull request no longer has anything to fix on What was checked: the conflict ( The fix was right for the screensaver it targeted. My earlier verification on a worker showed that, and #8386 was a real crash. Thank you @PyRo1121 for tracking it down. It is now with the maintainer, with a recommendation to close this pull request and #8386 as fixed by the native screensaver. |
Fixes #8985
exit_screensaverpkills the parent terminal (its command line carries the screensaver class), and the dying terminal signals the script back. With the trap still armed, that echo re-entered the handler — nesting until bash overflowed its stack (~63,500 frames, SIGSEGV).The handler now silences SIGINT/SIGTERM/SIGHUP/SIGQUIT before signalling other screensaver processes, so the cleanup restores the cursor, stops ttfx, and exits exactly once.
Tests:
bash test/shell.d/screensaver-exit-test.sh— dismisses a stubbed screensaver whose cleanup echoes a SIGHUP back (the way a dying terminal does) and asserts the cursor is restored exactly once and the script exits 0; it fails on the unpatched handlerbash -n bin/omarchy-screensaver test/shell.d/screensaver-exit-test.shgit diff --checkFixes #8386