Repository navigation
Commit 478be42
fix(broker): only tree-kill the broker pid when its endpoint was live
Hardening follow-up to the respawn-path kill: only pass killProcess when
we confirmed the existing broker's endpoint was ready (so the pid still
belongs to our broker). For a stale session whose endpoint is not ready,
the pid likely points at a dead broker whose pid the OS may have reused
for an unrelated process — in that case just drop the socket/session
files and let any survivor exit on its own.
This narrows the PID-reuse surface on the respawn path while preserving
the orphaned-process fix (the live-broker respawn case still tree-kills).
Co-Authored-By: Claude <[email protected]>1 parent 8458741 commit 478be42
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
173 | 180 | | |
174 | | - | |
| 181 | + | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| |||
0 commit comments