MCPcopy Index your code
hub / github.com/continuedev/continue / killTerminalProcess

Function killTerminalProcess

core/util/processTerminalStates.ts:70–86  ·  view source on GitHub ↗
(toolCallId: string)

Source from the content-addressed store, hash-verified

68}
69
70export async function killTerminalProcess(toolCallId: string): Promise<void> {
71 const processInfo = processTerminalForegroundStates.get(toolCallId);
72 if (processInfo && !processInfo.process.killed) {
73 const { process } = processInfo;
74
75 process.kill("SIGTERM");
76
77 // Force kill after 5 seconds if still running
78 setTimeout(() => {
79 if (!process.killed) {
80 process.kill("SIGKILL");
81 }
82 }, 5000);
83
84 processTerminalForegroundStates.delete(toolCallId);
85 }
86}
87
88// Function to cancel multiple terminal commands at once
89export async function killMultipleTerminalProcesses(

Calls 3

killMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected