FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-98552: flush std streams in the multiprocessing forkserver before fork by gpshead · Pull Request #141849 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions Lib/multiprocessing/forkserver.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,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
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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.
Loading

Back | FazBrowse Home | New Git URL