(child: ChildProcess)
| 300 | } |
| 301 | |
| 302 | function stopDetachedHelper(child: ChildProcess): void { |
| 303 | try { |
| 304 | child.kill?.('SIGTERM'); |
| 305 | } catch { |
| 306 | // Best-effort cleanup for detached helpers. |
| 307 | } |
| 308 | try { |
| 309 | child.unref(); |
| 310 | } catch { |
| 311 | // Best-effort event-loop release for detached helpers. |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | function renameHelperLogPathOrThrow( |
| 316 | currentPath: string, |
no test coverage detected