[3.13] gh-98552: flush std streams in the multiprocessing forkserver before fork (GH-141849) (#141852)

gh-98552: flush std streams in the multiprocessing forkserver before fork (GH-141849)

* flush std streams in the multiprocessing forkserver before fork

* NEWS
(cherry picked from commit 58badb1711)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-11-22 21:23:30 +01:00 committed by GitHub
parent 66576c2be8
commit 60c02ff714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -270,6 +270,7 @@ def sigchld_handler(*_unused):
len(fds)))
child_r, child_w, *fds = fds
s.close()
util._flush_std_streams()
pid = os.fork()
if pid == 0:
# Child