fix(shutdown): use KillSessionWithProcesses to prevent orphans
Address review feedback: revert KillSession back to KillSessionWithProcesses in stopSession() to properly terminate all child processes. KillSessionWithProcesses recursively finds and terminates descendant processes with SIGTERM/SIGKILL, preventing orphaned Claude/node processes that can survive tmux session kills. The orphan detection in verifyShutdown() remains as a helpful warning but shouldn't replace proper process termination.
This commit is contained in:
@@ -393,8 +393,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