From 90f0dc8f7d3a3b67e2c2620cc01c1978cd7fa288 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Sun, 20 Sep 2026 14:31:11 +0800 Subject: [PATCH] Check terminal descendant quiescence without requiring PID reaping --- packages/terminal/terminal-bash/tests/local.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/terminal/terminal-bash/tests/local.spec.ts b/packages/terminal/terminal-bash/tests/local.spec.ts index 7ef28c6929..d539d56298 100644 --- a/packages/terminal/terminal-bash/tests/local.spec.ts +++ b/packages/terminal/terminal-bash/tests/local.spec.ts @@ -233,9 +233,10 @@ describe.skipIf(process.platform === 'win32')('terminal-bash real shell', () => const child = /CHILD=(\d+)/.exec(output)?.[1] expect(child).toBeDefined() const pid = Number(child) - expect(() => process.kill(pid, 0)).not.toThrow() + expect(processIsRunning(pid)).toBe(true) await ctx.terminals.kill(agent, created.sessionId) - expect(() => process.kill(pid, 0)).toThrow() + // Linux can retain an exited descendant's PID until its parent reaps it. + expect(processIsRunning(pid)).toBe(false) }, 10_000) it('quiesces a disowned same-session descendant after the shell exits naturally', async () => {