MCPcopy Create free account
hub / github.com/codeaashu/claude-code / forceKill

Function forceKill

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

Source from the content-addressed store, hash-verified

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.
507 if (!sigkillSent && child.pid) {
508 sigkillSent = true
509 deps.onDebug(
510 `[bridge:session] Sending SIGKILL to sessionId=${opts.sessionId} pid=${child.pid}`,
511 )
512 if (process.platform === 'win32') {
513 child.kill()
514 } else {
515 child.kill('SIGKILL')
516 }
517 }
518 },
519 writeStdin(data: string): void {
520 if (child.stdin && !child.stdin.destroyed) {
521 deps.onDebug(

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected