From 464099c1cdc1fb84d3dc71921e8161c66dea8710 Mon Sep 17 00:00:00 2001 From: Pierre Kisters <1524059+lhns@users.noreply.github.com> Date: Thu, 1 Oct 2026 04:06:24 +0200 Subject: [PATCH] Clipboard sync: a process gone since pgrep no longer aborts the switch ps fails for it, and with pipefail the assignment ended the activation; it is skipped now. --- modules/clipboard-sync.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/clipboard-sync.nix b/modules/clipboard-sync.nix index 7d36887..7df42ba 100644 --- a/modules/clipboard-sync.nix +++ b/modules/clipboard-sync.nix @@ -54,7 +54,8 @@ in { desktop=() other=() for pid in $(${pkgs.procps}/bin/pgrep -x clipboard-sync || true); do # clipboard-sync forks workers; only look at top-level instances. - ppid="$(${pkgs.procps}/bin/ps -o ppid= -p "$pid" | tr -d ' ')" + # Gone since pgrep (e.g. an exited worker): skip it. + ppid="$(${pkgs.procps}/bin/ps -o ppid= -p "$pid" | tr -d ' ')" || continue [ "$(cat "/proc/$ppid/comm" 2>/dev/null)" = clipboard-sync ] && continue if [ "$(readlink "/proc/$pid/exe" 2>/dev/null)" != "$want" ]; then run kill "$pid" || true # stale build