Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Dec 11, 2025

Summary

  • Replace custom spawn-based orchestration in examples/run-all.ts with concurrently's programmatic API
  • Fixes zombie processes left behind when killing npm run examples:start with Ctrl+C

Problem

The custom spawn() + proc.kill() cleanup didn't kill grandchildren processes:

bun examples/run-all.ts
  └── npm run --workspace examples/foo start
        └── /bin/sh -c "bun serve.ts"
              └── bun serve.ts  ← ORPHANED on Ctrl+C!

Solution

Use concurrently's API which handles process tree killing via tree-kill internally:

const { result } = concurrently(commands, {
  prefix: "name",
  killOthersOnFail: command !== "build",
});

Test plan

  • npm run examples:build works
  • npm run examples:start + Ctrl+C → no zombie processes on ports 3101-3108

🤖 Generated with Claude Code

Replace custom spawn-based orchestration with concurrently's API.
This fixes zombie processes on Ctrl+C - concurrently uses tree-kill
internally to properly terminate entire process trees.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@128

commit: 1bb3bdc

Copy link
Member

@jonathanhefner jonathanhefner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🧟‍♂️

@ochafik ochafik merged commit 8075bff into main Dec 11, 2025
8 checks passed
@ochafik ochafik deleted the ochafik/concurrently-api branch December 13, 2025 12:10
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.

3 participants