Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(69884)

Unified Diff: Lib/asyncio/proactor_events.py

Issue 21998: asyncio: a new self-pipe should be created in the child process after fork
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/asyncio/base_events.py ('k') | Lib/asyncio/selector_events.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/asyncio/proactor_events.py Thu Feb 05 11:46:45 2015 +0100
+++ b/Lib/asyncio/proactor_events.py Thu Feb 05 12:02:08 2015 +0100
@@ -489,6 +489,10 @@ class BaseProactorEventLoop(base_events.
f.add_done_callback(self._loop_self_reading)
def _write_to_self(self):
+ # The self-pipe must not be shared between two processes: at fork,
+ # create a new pipe to unshare it
+ self._detect_fork()
+
self._csock.send(b'\0')
def _start_serving(self, protocol_factory, sock,
« no previous file with comments | « Lib/asyncio/base_events.py ('k') | Lib/asyncio/selector_events.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+