next.js
9f7ee4a0 - fix(turbopack-trace-utils): skip the ctrl-c handler on wasm (#97856)

Commit
67 days ago
fix(turbopack-trace-utils): skip the ctrl-c handler on wasm (#97856) > Replaces #97582, which was **not merged**. Reordering this stack briefly left that PR > pointing at a base branch that had come to contain its own head commit, so GitHub closed it > as merged and deleted its branch. Nothing from it reached `canary`. It had been approved; > this PR is the same commit (`8f8bc4d0b0`), restored, and needs review again. Sorry for the churn. ### What? `turbopack-trace-utils` no longer registers a Ctrl-C handler on wasm targets. ### Why? `tokio::signal` does not exist on wasi, so `exit.rs` failed to compile. There is also no SIGINT to wait for inside a wasm instance, so there is nothing to handle. ### How? The `tokio::spawn` calls in `ExitGuard::new` and `ExitHandler::listen` are gated to non-wasm. On wasm, `ExitGuard` fires only when the guard is dropped, and `ExitHandler::listen` registers no handler — the doc comments now say so, and point wasm callers at `ExitHandler::new_receiver`. <!-- NEXT_JS_LLM --> <!-- fleet b6d0486f-97c7-42a7-bdaf-3490774cdec3 --> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Author
Parents
Loading