Skip to content

fix: Avoid hanging PTY shutdown#12958

Merged
anthonyshew merged 3 commits into
mainfrom
shew/hanging-on-ctrl-c
May 27, 2026
Merged

fix: Avoid hanging PTY shutdown#12958
anthonyshew merged 3 commits into
mainfrom
shew/hanging-on-ctrl-c

Conversation

@anthonyshew

@anthonyshew anthonyshew commented May 27, 2026

Copy link
Copy Markdown
Contributor

Why

Interactive PTY tasks can hang during graceful shutdown when the direct wrapper process does not forward SIGINT to its child process. This makes Ctrl+C require a second interrupt to force-kill tasks instead of shutting down cleanly.

What

Closes #12920

Adds a Unix PTY shutdown fallback that first gives wrapper processes a chance to forward SIGINT, then signals the PTY foreground process group if the wrapper is still running.

How

Unit testing add in cargo test -p turborepo-process. Used a Vercel-internal repository that started showing the behavior from #12920.

@anthonyshew anthonyshew requested a review from a team as a code owner May 27, 2026 14:43
@anthonyshew anthonyshew requested review from tknickman and removed request for a team May 27, 2026 14:43
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-svelte-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
examples-vite-web Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm
turbo-site Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:16pm

@anthonyshew anthonyshew merged commit 52e81bd into main May 27, 2026
57 of 58 checks passed
@anthonyshew anthonyshew deleted the shew/hanging-on-ctrl-c branch May 27, 2026 15:44
anthonyshew pushed a commit that referenced this pull request May 27, 2026
## Release v2.9.16-canary.2

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26525563543)

### Changes

- release(turborepo): 2.9.15-canary.7 (#12935) (`0e56cdc`)
- fix: Restore a few internal invariant checks (#12933) (`767a9d4`)
- fix: Improve profile tracing coverage (#12936) (`3063672`)
- fix: Use build-scale OTel duration buckets (#12939) (`6ed6fb0`)
- fix: Preserve pnpm injected peer package entries (#12940) (`31123f4`)
- feat: Add heap allocation profiling (#12943) (`c7ad6f2`)
- release(turborepo): 2.9.15-canary.8 (#12945) (`06e81ea`)
- docs: Correct attribute presence claims in turborepo-otel (#12932)
(`8fc94f3`)
- chore(turbo-codemod): remove duplicate "in" in transforms path comment
(#12948) (`5fa3039`)
- chore: Switch Geist font imports to npm geist package (#12952)
(`ebebf41`)
- fix: Respect root gitignore during prune (#12953) (`f96ccc4`)
- fix: Harden OTEL endpoint validation (#12954) (`076ff97`)
- release(turborepo): 2.9.15 (#12955) (`c85d410`)
- fix: Avoid hanging PTY shutdown (#12958) (`52e81bd`)
- fix: Retry npm tlog publish failures (#12959) (`5317f65`)
- release(turborepo): 2.9.16-canary.1 (#12960) (`2284fa9`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew pushed a commit that referenced this pull request May 28, 2026
## Release v2.9.16

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26579906777)

### Changes

- release(turborepo): 2.9.15 (#12955) (`c85d410`)
- fix: Avoid hanging PTY shutdown (#12958) (`52e81bd`)
- fix: Retry npm tlog publish failures (#12959) (`5317f65`)
- release(turborepo): 2.9.16-canary.1 (#12960) (`2284fa9`)
- fix: Preserve nested Bun dependency versions (#12963) (`8d4eaf8`)
- Revert "fix: Preserve nested Bun dependency versions" (#12964)
(`3b1b6e9`)
- release(turborepo): 2.9.16-canary.2 (#12961) (`5e5b248`)
- fix: Preserve nested Bun dependency versions (#12965) (`7952b46`)
- fix: Don't delete existing `.git` when using `--no-git` flag (#12968)
(`b4aa626`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Ctrl+C not crashing turbo dev

1 participant