Summary
When the parent openclaw process receives SIGINT (Ctrl+C) or SIGTERM (e.g., closing the terminal), it does not forward the signal to its openclaw-gateway child process. The gateway keeps running as an orphan, and ignores subsequent SIGTERM — requiring kill -9.
Steps to reproduce
- Start
openclaw gateway start in a terminal
- Hit Ctrl+C or close the terminal
- Run
ps aux | grep openclaw-gateway — the gateway is still running with TTY ??
- Repeat steps 1-3 a few times over normal usage
- Observe multiple zombie gateway processes accumulating
Expected behavior
When the parent openclaw process exits for any reason, it should:
- Forward SIGINT/SIGTERM to the
openclaw-gateway child
- Wait briefly for graceful shutdown
- SIGKILL the child if it doesn't exit within a timeout
The gateway itself should also handle SIGTERM gracefully rather than ignoring it.
Actual behavior
Over 3 days of normal usage (restarts, Ctrl+C, terminal closes), 6 zombie gateway processes accumulated from Friday Feb 13, all detached from any terminal:
PID PPID STAT TTY STARTED COMMAND
8819 8818 S ?? Fri Feb 13 16:23:01 openclaw-gateway
9386 1 S ?? Fri Feb 13 16:25:32 openclaw-gateway (orphaned to init)
9982 9980 S ?? Fri Feb 13 16:29:52 openclaw-gateway
10366 10364 S ?? Fri Feb 13 16:30:30 openclaw-gateway
10634 10632 S ?? Fri Feb 13 16:31:06 openclaw-gateway
21690 21689 S ?? Fri Feb 13 17:32:26 openclaw-gateway
All ignored kill <pid> (SIGTERM) and required kill -9 to terminate.
OpenClaw version
2026.2.12
Operating system
macOS 15 (Darwin 24.6.0, arm64) — Mac mini M4
Install method
npm global (nvm, Node v24.11.1)
Logs, screenshots, and evidence
Impact and severity
Affected: Any user running openclaw gateway from a terminal
Severity: Medium — zombie processes consume memory and can cause port conflicts on restart
Frequency: 100% repro — every Ctrl+C or terminal close leaves an orphan
Consequence: Stale gateway processes accumulate silently; users must manually kill -9 them. Over days this can consume significant memory (each gateway ~300-500MB RSS).
Additional information
The parent openclaw process spawns openclaw-gateway as a child but does not set up signal forwarding. When the parent receives SIGINT/SIGTERM, it exits without killing the child, which gets reparented to PID 1 (or stays attached to the dead parent). The gateway child also appears to ignore SIGTERM entirely, requiring SIGKILL.
Suggested fix: register SIGINT/SIGTERM handlers in the parent that forward to the child process group, with a timeout fallback to SIGKILL.
Summary
When the parent
openclawprocess receives SIGINT (Ctrl+C) or SIGTERM (e.g., closing the terminal), it does not forward the signal to itsopenclaw-gatewaychild process. The gateway keeps running as an orphan, and ignores subsequent SIGTERM — requiringkill -9.Steps to reproduce
openclaw gateway startin a terminalps aux | grep openclaw-gateway— the gateway is still running with TTY??Expected behavior
When the parent
openclawprocess exits for any reason, it should:openclaw-gatewaychildThe gateway itself should also handle SIGTERM gracefully rather than ignoring it.
Actual behavior
Over 3 days of normal usage (restarts, Ctrl+C, terminal closes), 6 zombie gateway processes accumulated from Friday Feb 13, all detached from any terminal:
All ignored
kill <pid>(SIGTERM) and requiredkill -9to terminate.OpenClaw version
2026.2.12
Operating system
macOS 15 (Darwin 24.6.0, arm64) — Mac mini M4
Install method
npm global (nvm, Node v24.11.1)
Logs, screenshots, and evidence
Impact and severity
Affected: Any user running openclaw gateway from a terminal
Severity: Medium — zombie processes consume memory and can cause port conflicts on restart
Frequency: 100% repro — every Ctrl+C or terminal close leaves an orphan
Consequence: Stale gateway processes accumulate silently; users must manually
kill -9them. Over days this can consume significant memory (each gateway ~300-500MB RSS).Additional information
The parent
openclawprocess spawnsopenclaw-gatewayas a child but does not set up signal forwarding. When the parent receives SIGINT/SIGTERM, it exits without killing the child, which gets reparented to PID 1 (or stays attached to the dead parent). The gateway child also appears to ignore SIGTERM entirely, requiring SIGKILL.Suggested fix: register SIGINT/SIGTERM handlers in the parent that forward to the child process group, with a timeout fallback to SIGKILL.