mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 10:18:57 +00:00
Revert "fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)"
This reverts commit a9624c0fff.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user