fix: ensure CLI processes exit after command completion on Windows#74425
fix: ensure CLI processes exit after command completion on Windows#744251yihui wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds an explicit Confidence Score: 5/5Safe to merge — the change is minimal, well-reasoned, and follows established Node.js patterns for CLI process termination. Single-line addition using the idiomatic No files require special attention. Reviews (1): Last reviewed commit: "fix: ensure CLI processes exit after com..." | Re-trigger Greptile |
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. The linked issue gives concrete Windows npm direct-entry commands and lingering-process timings, and current main source shows completed launcher paths can return without a final shutdown; I did not execute the Windows smoke in this Linux review. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this PR or an equivalent narrow launcher lifecycle fix after Windows npm smokes prove Do we have a high-confidence way to reproduce the issue? Yes. The linked issue gives concrete Windows npm direct-entry commands and lingering-process timings, and current main source shows completed launcher paths can return without a final shutdown; I did not execute the Windows smoke in this Linux review. Is this the best way to solve the issue? Yes, with validation pending. Awaiting the version fast path and flushing launcher output before the final exit is the narrowest maintainable source fix visible from the diff; the remaining blocker is real Windows behavior proof, not another code change. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7f27c42ebdb3. |
|
Maintainer follow-up pushed to address the review blockers. What changed:
Validation:
Remaining before merge per review notes: Windows npm-installed smoke proof that |
Summary
Fixes CLI processes (node.exe openclaw.mjs) remaining alive after command execution on Windows. The CLI entrypoint was missing process.exit() calls after commands completed, causing processes to hang.
Changes
process.exit(process.exitCode ?? 0)call after CLI entrypoint execution in openclaw.mjsTesting
Fixes #74378