MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / killTmuxServer

Function killTmuxServer

source code/utils/tmuxSocket.ts:254–268  ·  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

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