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

This reverts commit a9624c0fff.
This commit is contained in:
Aiden Cline
2025-10-27 01:30:13 -05:00
parent a9624c0fff
commit 1a6fd018f6
7 changed files with 51 additions and 71 deletions

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()