refactor: host pre-check probes its own socket path

The already-running check read the roster back only to learn the
socket path cmd_host had computed a few lines earlier. The roster's
presence still gates the probe: a leftover dir without one keeps
falling through to the mkdir lock and its 'party clean' hint.
This commit is contained in:
veg 2026-09-21 09:47:27 +00:00
parent d51656c9e4
commit 8661d2968e

10
party
View file

@ -807,13 +807,9 @@ EOF
echo "party: $party_dir exists and is not a directory you own" >&2 echo "party: $party_dir exists and is not a directory you own" >&2
exit 1 exit 1
fi fi
if [ -d "$party_dir" ] && [ -f "$rec" ]; then if [ -f "$rec" ] && [ "$(party_conn_state "$sock")" != dead ]; then
roster_read "$rec" 2>/dev/null || true echo "party: '$name' is already running" >&2
if [ -n "${RR_SOCKET:-}" ] \ exit 1
&& [ "$(party_conn_state "$RR_SOCKET")" != dead ]; then
echo "party: '$name' is already running" >&2
exit 1
fi
fi fi
# mkdir is the atomic acquisition primitive. POSIX mkdir(2) on an # mkdir is the atomic acquisition primitive. POSIX mkdir(2) on an