MCPcopy Index your code
hub / github.com/codeaashu/claude-code / killTmuxServer

Function killTmuxServer

src/utils/tmuxSocket.ts:252–266  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

getClaudeSocketNameFunction · 0.85
logForDebuggingFunction · 0.85
execTmuxFunction · 0.85

Tested by

no test coverage detected