MCPcopy Create free account
hub / github.com/Noumena-Network/code / forceKill

Function forceKill

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

Source from the content-addressed store, hash-verified

570 }
571 },
572 forceKill(): void {
573 // Use separate flag because child.killed is set when kill() is called,
574 // not when the process exits. We need to send SIGKILL even after SIGTERM.
575 if (!sigkillSent && child.pid) {
576 sigkillSent = true
577 deps.onDebug(
578 `[bridge:session] Sending SIGKILL to sessionId=${opts.sessionId} pid=${child.pid}`,
579 )
580 if (process.platform === 'win32') {
581 child.kill()
582 } else {
583 child.kill('SIGKILL')
584 }
585 }
586 },
587 writeStdin(data: string): void {
588 if (child.stdin && !child.stdin.destroyed) {
589 deps.onDebug(

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected