GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — Defer conptyNative.connect() to prevent event loop blocking by adityamandaleeka · Pull Request #885 · microsoft/node-pty Conversation
|
|
Thanks for the quick reviews! 🚀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Daniel Imms (@Tyriar) Martin Aeschlimann (@aeschli) When can I expect this patch to ship in a beta package? This is currently blocking a PR in another repo. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ages; determinized terminal tests Windows terminals reported pid 0 forever. node-pty defers ConPTY's connect (microsoft/node-pty#885), so IPty.pid is 0 until the first data event, and TerminalProcess.start read it synchronously after spawn. The pid property is now emitted once, on the first data event when node-pty had no pid at spawn (VS Code's terminalProcess contract), never as 0; the create reply does not wait for it (a silent shell must still start); refreshCwd never probes pid 0 (on macOS that was an lsof subprocess per Enter per terminal). A second Windows hazard from the same sources: node-pty's conout socket error handler rethrows when the socket has fewer than two error listeners and terminal.js registers none, so a conout error was an uncaught exception in the pty host; PtyAdapter gains onError, the spawner registers the guard at spawn and classifies with node-pty's own EAGAIN/EIO set, and TerminalProcess routes a fatal pty error into its ordinary exit path. The same pid 0 was why the real-pty suite killed its own vitest worker on the Windows lane: the survivor detector received pid 0, process.kill(0, 0) is always alive, and after its budget the SIGKILL of pid 0 became TerminateProcess on the worker itself (libuv substitutes the current process). The suite now refuses to signal any non-positive pid inside the test that produced it, waits for node-pty's live pid before recording a terminal, carries a win32-only stderr phase trace (evidence tooling, deleted once the lane is green twice) and a win32 ConPTY canary that pins the deferred-pid contract. The e2e teardown hang had one owner: the market service's stop drained an in-flight DexScreener poll riding the app's Chromium transport, whose window the quit was destroying, so the promise never settled and the cleanup registry's allSettled never resolved. The drain is bounded at its owner (2 s, timer armed before the await; a late poll can neither publish nor reschedule). Every quit participant is now a named, bounded, logged stage (lifecycle/quit-stage.ts; CleanupRegistry tasks carry a name and a deadline; runAll reports the unfinished one), before-quit runs under a backstop so app.exit is reached on every path, and the e2e fixture bounds app.close at 30 s and attaches the whole main log with the unfinished participants named when a quit wedges. 20 of 20 repeats green where 2 of 5 hung. Two renderer terminal suites lost their timing dependence: the workspace-close file owns a frozen clock and its late-create case proves exactly one close persist with the debounce disarmed (the macOS double persist was the ordinary background save firing first); the controller suites wait for XtermHost's mount effect (bridge.attaches) instead of a controller-rendered tab, because RTL's waitFor disables the act environment and does not order against React's MessageChannel flush. Gates on the combined tree: full vex-app suite, wallet suite serial, build with VITE_VEX_SETUP_TOUR=1 and check:build, Playwright with VEX_E2E_REQUIRE_TOUR=1 and the Studio journey executed; process boundaries, type ratchet, unsafe-escapes and em-dash on the tracked tree; bridge go vet.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
freeze when using debugger on windows
There was an error while loading. Please reload this page.