(live: LiveShellRun, exit: DriverExit)
| 1194 | } |
| 1195 | |
| 1196 | private onDriverExit(live: LiveShellRun, exit: DriverExit): void { |
| 1197 | if (live.driverExit || live.finalizeOnce) return; |
| 1198 | live.driverExit = exit; |
| 1199 | this.onNativeRootExit(live); |
| 1200 | if ( |
| 1201 | exit.mode === 'pipes' && |
| 1202 | (exit.value.stdoutTruncated || exit.value.stderrTruncated) && |
| 1203 | !live.integrityFailure |
| 1204 | ) { |
| 1205 | live.integrityFailure = new Error( |
| 1206 | 'Shell root exited before inherited output pipes drained completely', |
| 1207 | ); |
| 1208 | } |
| 1209 | if (live.mode === 'pty') live.collector.closeDataAdmission(); |
| 1210 | if (live.record.status === 'running') void this.beginFinalize(live).catch(() => {}); |
| 1211 | } |
| 1212 | |
| 1213 | private beginFinalize(live: LiveShellRun, abandoned = false): Promise<ShellRunRecord> { |
| 1214 | live.finalizeOnce ??= this.finalizeLive(live, abandoned); |
no test coverage detected