Merge branch 'main' into memory_usage3

This commit is contained in:
Spencer
2026-04-10 01:05:39 -04:00
committed by GitHub
8 changed files with 108 additions and 18 deletions
@@ -831,7 +831,10 @@ export class ShellExecutionService {
const finalStrippedOutput = stripAnsi(combinedOutput).trim();
const exitCode = code;
const exitSignal = signal ? os.constants.signals[signal] : null;
const exitSignal =
signal && os.constants.signals
? (os.constants.signals[signal] ?? null)
: null;
const resultPayload: ShellExecutionResult = {
rawOutput: Buffer.from(''),
@@ -1701,4 +1704,16 @@ export class ShellExecutionService {
signal: info.signal,
}));
}
/**
* Resets the internal state of the ShellExecutionService.
* This is intended for use in tests to ensure isolation.
*/
static resetForTest(): void {
this.activePtys.clear();
this.activeChildProcesses.clear();
this.backgroundLogPids.clear();
this.backgroundLogStreams.clear();
this.backgroundProcessHistory.clear();
}
}