mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 03:00:13 +02:00
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.
This commit is contained in:
1 parent
ae8686e284
commit
464099c1cd
1 file changed
+2
-1
@@ -54,7 +54,8 @@ in {
|
|||||||
desktop=() other=()
|
desktop=() other=()
|
||||||
for pid in $(${pkgs.procps}/bin/pgrep -x clipboard-sync || true); do
|
for pid in $(${pkgs.procps}/bin/pgrep -x clipboard-sync || true); do
|
||||||
# clipboard-sync forks workers; only look at top-level instances.
|
# 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
|
[ "$(cat "/proc/$ppid/comm" 2>/dev/null)" = clipboard-sync ] && continue
|
||||||
if [ "$(readlink "/proc/$pid/exe" 2>/dev/null)" != "$want" ]; then
|
if [ "$(readlink "/proc/$pid/exe" 2>/dev/null)" != "$want" ]; then
|
||||||
run kill "$pid" || true # stale build
|
run kill "$pid" || true # stale build
|
||||||
|
|||||||
Reference in new issue
Block a user