MCPcopy Create free account
hub / github.com/deta/surf / killExistingProcess

Method killExistingProcess

app/src/main/surfBackend.ts:160–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158 }
159
160 private killExistingProcess(): void {
161 try {
162 const processName = basename(this.serverPath)
163 if (isWindows()) {
164 execSync(`taskkill /F /IM ${processName} /T`)
165 } else {
166 execSync(`pkill -x ${processName}`)
167 }
168 this.emit('info', 'killed existing surf backend server process')
169 } catch (error) {
170 this.emit('info', 'no existing surf backend server process found')
171 }
172 }
173}

Callers 1

startMethod · 0.95

Calls 1

isWindowsFunction · 0.90

Tested by

no test coverage detected