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

Function kill

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

Source from the content-addressed store, hash-verified

557 return currentActivity
558 },
559 kill(): void {
560 if (!child.killed) {
561 deps.onDebug(
562 `[bridge:session] Sending SIGTERM to sessionId=${opts.sessionId} pid=${child.pid}`,
563 )
564 // On Windows, child.kill('SIGTERM') throws; use default signal.
565 if (process.platform === 'win32') {
566 child.kill()
567 } else {
568 child.kill('SIGTERM')
569 }
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.

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected