Repository navigation
Conversation
Every omarchy update ended with "'/usr/bin/setpriv' terminated by signal TERM." Stay-awake stops its inhibitor by sending TERM to the held process, which had exec'd sleep infinity and so died from the signal. systemd-inhibit reports any child killed by a signal as an error and exits 1. Keep the held shell alive instead, sleeping in the background, and exit 0 from a TERM trap. The shell already carries the update token as its $0, so stop still identifies it by pid, start time, owner, and token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Reported as #13337. |
Contributor
Author
|
Superseded by #13361, which fixes the same message with a smaller change: the held shell traps TERM, kills its sleep, and exits 0. |
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.
Every
omarchy updateends with:omarchy-update-stay-awake stopends the sleep inhibitor by sending TERM to the held process. That process hadexec'dsleep infinity, so it died from the signal.systemd-inhibitwaits on its child and reports any child killed by a signal as an error, then exits 1. The message is harmless, becausesudo -bdetaches the inhibitor and nothing checks its status, but it looks like a failure at the end of every update. It predates #13323; it has shown up since the identity-bound cleanup in 6af052f.Fix
The held shell now stays alive, sleeps in 60-second background chunks, and exits 0 from a TERM trap that also kills the current sleep.
systemd-inhibitthen sees a clean exit and stays quiet.Identity checks are unchanged. The shell already carries
--why=Omarchy update in progress [token]as its$0, and it's the same process whose PID and start time it records, so stop still matches on PID, start time, owner and token. If stop ever escalates to KILL, the leftover sleep lasts at most 60 seconds.Verification
systemd-inhibit(idle lock). The old pattern printed'/usr/bin/sleep' terminated by signal TERM.and exited 1. The new one exits 0 with no output and leaves no sleep behind.update-stay-awake-security: the fakesystemd-inhibitrecords its child's exit status, and a stopped inhibitor must exit 0. It fails against the old code.trap stop_holding TERMline instead ofexec -a../test/shellfails only the same four files as cleanquattro(kernel-headers migration, kernel migration, passwordless-grant lifecycle, unowned system paths).🤖 Generated with Claude Code