]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multipr...
authorGregory P. Smith <68491+gpshead@users.noreply.github.com>
Sun, 23 Nov 2025 09:52:26 +0000 (01:52 -0800)
committerGitHub <noreply@github.com>
Sun, 23 Nov 2025 09:52:26 +0000 (09:52 +0000)
Revert (unneeded, already done elsewhere) "gh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)"

This reverts commit 58badb1711e12b6e8b5240ab96cdd01b95012de7.

Lib/multiprocessing/forkserver.py
Misc/NEWS.d/next/Library/2025-11-22-18-00-38.gh-issue-98552.d5KNy-.rst [deleted file]

index 8a4e8d835b0c91d67d6e2e2825f620db02d6a6d7..cc8947c5e04fb11b0ea3ef39db3a599851e940a3 100644 (file)
@@ -326,7 +326,6 @@ def main(listener_fd, alive_r, preload, main_path=None, sys_path=None,
                                     len(fds)))
                         child_r, child_w, *fds = fds
                         s.close()
-                        util._flush_std_streams()
                         pid = os.fork()
                         if pid == 0:
                             # Child
diff --git a/Misc/NEWS.d/next/Library/2025-11-22-18-00-38.gh-issue-98552.d5KNy-.rst b/Misc/NEWS.d/next/Library/2025-11-22-18-00-38.gh-issue-98552.d5KNy-.rst
deleted file mode 100644 (file)
index 37a71ac..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-The :mod:`multiprocessing` forkserver process now flushes stdout and stderr
-before it forks to avoid the confusion children inheriting any buffered but
-not yet written output data.  Normally there is none, but when using
-:func:`multiprocessing.set_forkserver_preload` there *could* be.