Revert "fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)"

This reverts commit 5f0e46c51c.
This commit is contained in:
Aiden Cline
2025-10-27 01:30:13 -05:00
parent 5f0e46c51c
commit 977339adab
7 changed files with 51 additions and 71 deletions
+4 -6
View File
@@ -22,6 +22,8 @@ import { AttachCommand } from "./cli/cmd/attach"
import { AcpCommand } from "./cli/cmd/acp"
import { EOL } from "os"
const cancel = new AbortController()
process.on("unhandledRejection", (e) => {
Log.Default.error("rejection", {
e: e instanceof Error ? e.message : e,
@@ -133,10 +135,6 @@ try {
console.error(e)
}
process.exitCode = 1
} finally {
// Some subprocesses don't react properly to SIGTERM and similar signals.
// Most notably, some docker-container-based MCP servers don't handle such signals unless
// run using `docker run --init`.
// Explicitly exit to avoid any hanging subprocesses.
process.exit();
}
cancel.abort()