fix: use setsid for herdr server bootstrap to prevent early termination when parent shell exits

This commit is contained in:
Antigravity
2026-07-20 10:36:49 +09:00
parent 90afd45aba
commit 087a294135
+1 -1
View File
@@ -117,7 +117,7 @@ except Exception:
# Headless bootstrap avoids herdr's "nested herdr is disabled" guard that
# blocks a normal interactive `herdr --session <name>` launch from inside
# an existing herdr pane (which is how MAM's own agents usually run).
nohup "$REAL_HERDR" --session "$_MAM_SESSION" server >/dev/null 2>&1 &
setsid "$REAL_HERDR" --session "$_MAM_SESSION" server </dev/null >/dev/null 2>&1 &
disown 2>/dev/null || true
for _mam_wait_i in $(seq 1 40); do
[ -S "${HOME:-$HOME_DIR}/.config/herdr/sessions/$_MAM_SESSION/herdr.sock" ] && break