fix(pty): preserve startup cancellation and zombie cleanup

This commit is contained in:
Tianyi Cui
2026-07-22 23:54:59 +08:00
parent 5689d1a9b4
commit 306681b53b
8 changed files with 47 additions and 18 deletions

View File

@@ -186,6 +186,9 @@ export class LocalPtySession implements PtyBackendSession {
if (result.waitReason === 'session_exit') throw new Error('PTY shell exited during startup')
if (result.waitReason === 'timeout') throw new Error('PTY shell did not reach readiness before startup timeout')
this.motd = result.viewport
} catch (error: unknown) {
signal?.throwIfAborted()
throw error
} finally {
this.initializing = false
}