Skip to content

🐛 Bound Windows process shutdown - #231

Closed
taras wants to merge 1 commit into
mainfrom
agent/windows-process-teardown
Closed

🐛 Bound Windows process shutdown#231
taras wants to merge 1 commit into
mainfrom
agent/windows-process-teardown

Conversation

@taras

@taras taras commented Aug 7, 2026

Copy link
Copy Markdown
Member

Motivation

Windows teardown currently waits for stdout and stderr EOF before checking whether it should run taskkill /T /F. When a process or descendant keeps an inherited output handle open, that wait never completes, the force-kill fallback is unreachable, and scope teardown hangs.

This is the Windows-specific follow-up to #228 and is intentionally separate from the Process.exited() API work in #230.

Approach

  • Send Ctrl-C and close stdin as the graceful shutdown phase.
  • Race close-settled process completion against a one-second grace period.
  • Run taskkill /T /F when the grace period expires, then await final stdout and stderr closure.
  • Add a Windows-only lifecycle regression whose parent and inherited-stdio descendant ignore Ctrl-C, requiring the process-tree fallback for Task.halt() to finish.
  • Bump @effectionx/process from 0.8.1 to 0.8.2.

Validation

  • pnpm check
  • pnpm build
  • pnpm lint
  • pnpm fmt:check
  • pnpm sync
  • pnpm test:node (34 passed)
  • pnpm test process (36 passed locally; Windows-only regression skipped on macOS)
  • pnpm test (382 passed, 6 skipped)

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1f54b029-54ef-4c92-a9cb-468067cbdceb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@effectionx/process@231

commit: f57c086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant