Only recover a session lock no other locker may hold (#15020)
Hyprland lets any client take over a held lock, so a second shell started beside the desktop judged the real shell's live lock stranded, took it, and then exited, leaving the session behind the failsafe while the real shell still reported itself secure. Recovery now waits while any other Quickshell or hyprlock runs, and gives up if one never exits. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a98e55eb91
commit
754d2d04b3
4 files changed
+68
-5
No files matched your search
@@ -110,8 +110,11 @@ Item {
|
||||
}
|
||||
|
||||
// ext-session-lock outlives its client, and a restart carries no lock over, so
|
||||
// a session locked this early is an orphan behind Hyprland's failsafe. Outputs
|
||||
// are often still absent here, so ask until the answer means something.
|
||||
// a session locked this early may be an orphan behind Hyprland's failsafe. It
|
||||
// may also be another shell's live lock, which Hyprland would let this one
|
||||
// take over and then strand on exit, so the helper answers undetermined while
|
||||
// another locker runs. Outputs are often still absent here, so ask until the
|
||||
// answer means something.
|
||||
function checkStrandedLock() {
|
||||
if (strandedLockResolved || strandedLockCheckProc.running) return
|
||||
|
||||
@@ -687,7 +690,8 @@ Item {
|
||||
|
||||
Process {
|
||||
id: strandedLockCheckProc
|
||||
command: ["bash", "-c", "omarchy-hyprland-session-locked"]
|
||||
// $PPID is this shell: a crash re-execs in place, so its pid is the one to skip.
|
||||
command: ["bash", "-c", "omarchy-hyprland-session-lock-stranded \"$PPID\""]
|
||||
onExited: function(exitCode) {
|
||||
// No output to read the lock off yet.
|
||||
if (exitCode === 2) return
|
||||
|
||||
Reference in new issue
Block a user