mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-15 09:25:28 +02:00
chore(browse): explicit windowsHide on every Bun.spawn site + census tripwire (#2575 residual)
Bun.spawn sites were structurally outside the windowsHide census (it swept child_process bindings only). The runtime was already safe — native Bun hides consoles by default and bun-polyfill.cjs defaults windowsHide !== false since #2523/#2539 — but implicit defaults are exactly what regress silently. Every Bun.spawn/spawnSync in browse/src now carries the explicit flag (harmless on unix-only sites like Xvfb/xattr/open), and a second SWEEP in windows-spawn-hide.test.ts fails CI on any new flagless Bun.spawn site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ddeeb18edb
commit
c4d91507dd
@@ -212,6 +212,7 @@ function cleanupLegacyState(): void {
|
||||
if (data.pid && isProcessAlive(data.pid)) {
|
||||
// Verify this is actually a browse server before killing
|
||||
const check = Bun.spawnSync(['ps', '-p', String(data.pid), '-o', 'command='], {
|
||||
windowsHide: true,
|
||||
stdout: 'pipe', stderr: 'pipe', timeout: 2000,
|
||||
});
|
||||
const cmd = check.stdout.toString().trim();
|
||||
@@ -1645,6 +1646,7 @@ Refs: After 'snapshot', use @e1, @e2... as selectors:
|
||||
// (the user asked to SEE the shared browser), and connect's #2219 guard
|
||||
// would otherwise refuse to replace the healthy headless daemon.
|
||||
const connectProc = Bun.spawn([browseBin, 'connect', '--force-restart'], {
|
||||
windowsHide: true,
|
||||
cwd: process.cwd(),
|
||||
stdio: ['ignore', 'inherit', 'inherit'],
|
||||
// Disable parent-PID monitoring: pair-agent needs the server to outlive
|
||||
|
||||
Reference in New Issue
Block a user