Merge pull request #313 from eugeneandrienko/master

stumpish: Fix search for stumpwm PID if launched as stumpwm child pro…
This commit is contained in:
David 2026-01-08 22:10:41 -05:00 committed by GitHub
commit 5733636475
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,9 @@ fi
stumpwm_pid ()
{
if command -v pgrep 2>&1 >/dev/null; then
if test $(uname -s) = "FreeBSD" && command -v pgrep 2>&1 > /dev/null; then
STUMPWM_PID=$(pgrep -a -u $(id -u) stumpwm)
elif command -v pgrep 2>&1 >/dev/null; then
STUMPWM_PID=$(pgrep -u $(id -u) stumpwm)
elif [ -d /proc ]; then
# Go up the process chain until we locate StumpWM's process using