MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / hardKill

Function hardKill

sdk/src/tools/code-search.ts:144–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 }
143
144 const hardKill = () => {
145 try {
146 childProcess.kill('SIGTERM')
147 } catch {}
148 // Store timeout reference so it can be cleared if process closes normally
149 killTimeoutId = setTimeout(() => {
150 try {
151 childProcess.kill('SIGKILL')
152 } catch {
153 try {
154 childProcess.kill()
155 } catch {}
156 }
157 killTimeoutId = null
158 }, 1000)
159 }
160
161 const formatCollectedOutput = (rawOutput: string) =>
162 formatCodeSearchOutput(rawOutput, {

Callers 1

codeSearchFunction · 0.85

Calls 1

setTimeoutFunction · 0.85

Tested by

no test coverage detected