SIGN IN SIGN UP

[3.13] gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338) (#135671)

gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338)

If a preloaded module writes to stdout or stderr, and the stream is buffered,
child processes will inherit the buffered data after forking. Attempt to
prevent this by flushing the streams after preload.
(cherry picked from commit 9877d191f441741fc27ae5e7a6dd7ab6d4bcc6b7)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
M
Miss Islington (bot) committed
a0a1aa3125a1547830b38d93b862204b581361d2
Parent: 28a70a5
Committed by GitHub <noreply@github.com> on 6/18/2025, 12:40:21 PM