fix(servuo): detect a shard launched relative from its root (#47) #48

Merged
whitlocktech merged 1 commits from fix/running-shard-detection into main 2026-11-27 02:05:37 -06:00

1 Commits

Author SHA1 Message Date
51bfd34d74 fix(servuo): detect a shard launched relative from its root (#47)
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 2m2s
find_running matched only on a process's exe + argv, so `mono ServUO.exe`
started from inside the root (systemd WorkingDirectory=, tmux) was reported
"not running" and install/update deployed under a live shard.

The decision moves to a pure classify(): ServUO.exe as the executable is
decided by its path; the old exe+argv substring rule is kept; otherwise a
relative ServUO.exe argument is resolved against the process's cwd and must
land inside the root (component-wise, so /opt/ServUO2 is not /opt/ServUO).
An unreadable cwd fails closed with its own refusal (stop it or re-run with
sudo); doctor counts only certain matches.

Also skips Linux thread entries in the scan so the refusal names the real
pid, not a TID (#45 item 5).

Closes #47

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
2026-11-27 01:58:11 -06:00