MCPcopy Create free account
hub / github.com/freecodexyz/free-code / kill

Function kill

src/bridge/sessionRunner.ts:491–503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

489 return currentActivity
490 },
491 kill(): void {
492 if (!child.killed) {
493 deps.onDebug(
494 `[bridge:session] Sending SIGTERM to sessionId=${opts.sessionId} pid=${child.pid}`,
495 )
496 // On Windows, child.kill('SIGTERM') throws; use default signal.
497 if (process.platform === 'win32') {
498 child.kill()
499 } else {
500 child.kill('SIGTERM')
501 }
502 }
503 },
504 forceKill(): void {
505 // Use separate flag because child.killed is set when kill() is called,
506 // not when the process exits. We need to send SIGKILL even after SIGTERM.

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected