fix(extraction): close final scope integration gaps
Ignore late JVM output events after abort or timeout until the real child close reconciles opened files. Restrict deferred archive cleanup to package-owned item paths so shared download roots retain foreign archives while package-local empty directory cleanup still works. Update deferred ownership and output-scope fixtures to the coordinator contract.
This commit is contained in:
+10
-4
@@ -1863,6 +1863,9 @@ function handleDaemonLine(line: string): void {
|
||||
|
||||
if (daemonCurrentRequest) {
|
||||
const req = daemonCurrentRequest;
|
||||
if (req.terminationStarted) {
|
||||
return;
|
||||
}
|
||||
parseJvmLine(trimmed, req.onArchiveProgress, req.parseState, req.onOutput);
|
||||
failDaemonOutputCallback(req);
|
||||
}
|
||||
@@ -1912,12 +1915,15 @@ function startDaemon(layout: JvmExtractorLayout): boolean {
|
||||
child.stderr!.on("data", (chunk) => {
|
||||
const raw = String(chunk || "");
|
||||
daemonOutput = appendLimited(daemonOutput, raw);
|
||||
daemonStderrBuffer += raw;
|
||||
const lines = daemonStderrBuffer.split(/\r?\n/);
|
||||
daemonStderrBuffer = lines.pop() || "";
|
||||
for (const line of lines) {
|
||||
daemonStderrBuffer += raw;
|
||||
const lines = daemonStderrBuffer.split(/\r?\n/);
|
||||
daemonStderrBuffer = lines.pop() || "";
|
||||
for (const line of lines) {
|
||||
if (daemonCurrentRequest) {
|
||||
const req = daemonCurrentRequest;
|
||||
if (req.terminationStarted) {
|
||||
continue;
|
||||
}
|
||||
parseJvmLine(line, req.onArchiveProgress, req.parseState, req.onOutput);
|
||||
failDaemonOutputCallback(req);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user