From 04ebf8d67abcf36b758762498b2d1554175dc8cc Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 15 Jan 2026 06:58:46 +0000 Subject: [PATCH] docs: note child process bridge helper --- docs/gateway/background-process.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/gateway/background-process.md b/docs/gateway/background-process.md index da8874bc8..3d79b052e 100644 --- a/docs/gateway/background-process.md +++ b/docs/gateway/background-process.md @@ -26,6 +26,10 @@ Behavior: - Output is kept in memory until the session is polled or cleared. - If the `process` tool is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`. +## Child process bridging + +When spawning long-running child processes outside the exec/process tools (for example, CLI respawns or gateway helpers), attach the child-process bridge helper so termination signals are forwarded and listeners are detached on exit/error. This avoids orphaned processes on systemd and keeps shutdown behavior consistent across platforms. + Environment overrides: - `PI_BASH_YIELD_MS`: default yield (ms) - `PI_BASH_MAX_OUTPUT_CHARS`: in‑memory output cap (chars)