feat(tmux): add KillSessionWithProcesses for explicit process termination
Before calling tmux kill-session, explicitly kill the pane's process tree using pkill. This ensures claude processes don't survive session termination due to SIGHUP being caught/ignored. Implementation: - Add KillSessionWithProcesses() to tmux.go - Update killSessionsInOrder() in start.go to use new method - Update stopSession() in down.go to use new method Fixes: gt-5r7zr Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -387,8 +387,8 @@ func stopSession(t *tmux.Tmux, sessionName string) (bool, error) {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
// Kill the session
|
||||
return true, t.KillSession(sessionName)
|
||||
// Kill the session (with explicit process termination to prevent orphans)
|
||||
return true, t.KillSessionWithProcesses(sessionName)
|
||||
}
|
||||
|
||||
// acquireShutdownLock prevents concurrent shutdowns.
|
||||
|
||||
Reference in New Issue
Block a user