MCPcopy Create free account
hub / github.com/Noumena-Network/code / killTmuxServer

Function killTmuxServer

src/utils/tmuxSocket.ts:255–269  ·  view source on GitHub ↗

* Kills the tmux server for NCode's isolated socket. * Called during graceful shutdown to clean up resources.

()

Source from the content-addressed store, hash-verified

253 * Called during graceful shutdown to clean up resources.
254 */
255async function killTmuxServer(): Promise<void> {
256 const socket = getNcodeSocketName()
257 logForDebugging(`[Socket] Killing tmux server for socket: ${socket}`)
258
259 const result = await execTmux(['-L', socket, 'kill-server'])
260
261 if (result.code === 0) {
262 logForDebugging(`[Socket] Successfully killed tmux server`)
263 } else {
264 // Server may already be dead, which is fine
265 logForDebugging(
266 `[Socket] Failed to kill tmux server (exit ${result.code}): ${result.stderr}`,
267 )
268 }
269}
270
271async function doInitialize(): Promise<void> {
272 const socket = getNcodeSocketName()

Callers

nothing calls this directly

Calls 3

getNcodeSocketNameFunction · 0.85
logForDebuggingFunction · 0.70
execTmuxFunction · 0.70

Tested by

no test coverage detected