summary refs log tree commit diff
path: root/os/etc/s6-rc/src/desktop-session-running/find-marker-proc
diff options
context:
space:
mode:
Diffstat (limited to 'os/etc/s6-rc/src/desktop-session-running/find-marker-proc')
-rwxr-xr-xos/etc/s6-rc/src/desktop-session-running/find-marker-proc15
1 files changed, 0 insertions, 15 deletions
diff --git a/os/etc/s6-rc/src/desktop-session-running/find-marker-proc b/os/etc/s6-rc/src/desktop-session-running/find-marker-proc
deleted file mode 100755
index 4f39eec..0000000
--- a/os/etc/s6-rc/src/desktop-session-running/find-marker-proc
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# find first process with marker=true envvar set
-set -eu
-uid="${1:?}"
-done=
-while true; do
-	for pid in $(pgrep -u ${uid}); do
-		if grep -q 'marker=true' /proc/${pid}/environ 2>/dev/null; then
-			printf "%s" "$pid"
-			done=1
-			break
-		fi
-	done
-	[ -n "$done" ] && break
-done