#1022 ShellOutputStreamer leaks the stdout/stderr pipe of every streamed shell command
Description
EditEARS: When ShellOutputStreamer.run finishes (normally, on timeout or on a non-zero exit), it shall close the process's stdout and stderr pipes.
Evidence: tests/unit/test_shell_unsandboxed_env_994.py::test_unsandboxed_streaming_shell_sees_no_worker_secrets fails under filterwarnings=error with ResourceWarning: unclosed file <_io.TextIOWrapper name=14> from engine/tools/shell_output_streamer.py (emulated CI, engine 010ea03). Each streamed command leaves two fds open until garbage collection in the worker.
Fix (uncommitted): body of run() wrapped in try/finally that closes both pipes (git diff -w: 5 added lines). Red: 1 failed, 6 passed; green: 7 passed three runs in a row, module __file__ printed from the patched copy.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...