MCPcopy
hub / github.com/RedPlanetHQ/core / kill

Method kill

packages/cli/src/server/pty/manager.ts:302–312  ·  view source on GitHub ↗
(sessionId: string, signal: string = 'SIGTERM')

Source from the content-addressed store, hash-verified

300 }
301
302 kill(sessionId: string, signal: string = 'SIGTERM'): boolean {
303 const handle = this.handles.get(sessionId);
304 if (!handle) return false;
305 try {
306 handle.cancelled = true;
307 handle.pty.kill(signal);
308 return true;
309 } catch {
310 return false;
311 }
312 }
313
314 /**
315 * Kill a session and wait for the OS to reap the PTY (so a follow-up `spawn`

Callers 15

killAndWaitMethod · 0.95
killAllMethod · 0.95
isProcessRunningByPidFunction · 0.80
lockIsStaleFunction · 0.80
isProcessRunningFunction · 0.80
stopProcessFunction · 0.80
isPidRunningFunction · 0.80
killProcessFunction · 0.80
forwardFunction · 0.80
runGatewayStopFunction · 0.80
executeCommandFunction · 0.80
handleAskFunction · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected