MCPcopy
hub / github.com/volcengine/MineContext / forceKillBackendProcess

Function forceKillBackendProcess

frontend/src/main/backend.ts:241–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239
240// Force kill the backend process
241function forceKillBackendProcess() {
242 if (backendProcess) {
243 try {
244 if (process.platform !== 'win32') {
245 // Use SIGKILL to force kill the process group
246 logToBackendFile(`Force killing process group -${backendProcess.pid} with SIGKILL`)
247 process.kill(-backendProcess.pid, 'SIGKILL')
248 } else {
249 // Force terminate on Windows systems
250 logToBackendFile(`Force killing process ${backendProcess.pid}`)
251 backendProcess.kill('SIGKILL')
252 }
253 } catch (killError) {
254 logToBackendFile(`Error force killing process: ${killError}`)
255 }
256 }
257}
258
259// Kill process by port
260function killProcessByPort(port: number) {

Callers 1

stopBackendServerFunction · 0.85

Calls 1

logToBackendFileFunction · 0.85

Tested by

no test coverage detected