fix(process): await Swift frontend lifetime pipe (#7948)

This commit is contained in:
morluto authored and GitHub committed 2026-10-29 08:43:04 +08:00
1 parent 0448f318e6
commit c92322b473
4 files changed
+40 -15

No files matched your search

+4 -3
View File
@@ -523,6 +523,7 @@ export const createDarwinProcessRunTokenReader = (
maxBuffer: 1024 * 1024,
signal,
stopSignal: SWIFTC_INTERRUPT,
lifetimePipe: true,
env: compilerEnvironment,
});
} catch (cause: unknown) {
@@ -535,9 +536,9 @@ export const createDarwinProcessRunTokenReader = (
} catch (cause: unknown) {
operation.primaryFailure = { cause };
if (operationRoot !== undefined) {
// execFileOutput has settled, so inherited compiler pipes are closed.
// That is not proof for a child that did not inherit them; this owner
// does not signal processes it did not launch.
// The extra pipe keeps settlement pending for Swift frontend writers
// that inherit it after the driver and its standard streams close.
// It cannot establish completion of a child that did not inherit it.
try {
await cleanupRoot(operationRoot);
} catch (cleanup: unknown) {