mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-28 23:11:19 -07:00
fix(core)#20941: reap orphaned descendant processes on PTY abort (#21124)
Co-authored-by: Spencer <spencertang@google.com>
This commit is contained in:
@@ -1181,10 +1181,12 @@ export class ShellExecutionService {
|
||||
await this.cleanupLogStream(pid);
|
||||
|
||||
if (activeChild) {
|
||||
killProcessGroup({ pid }).catch(() => {});
|
||||
await killProcessGroup({ pid }).catch(() => {});
|
||||
this.activeChildProcesses.delete(pid);
|
||||
} else if (activePty) {
|
||||
killProcessGroup({ pid, pty: activePty.ptyProcess }).catch(() => {});
|
||||
await killProcessGroup({ pid, pty: activePty.ptyProcess }).catch(
|
||||
() => {},
|
||||
);
|
||||
try {
|
||||
(activePty.ptyProcess as IPty & { destroy?: () => void }).destroy?.();
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user