Fix for issue 14725 for 3.2 branch · pythoncapi/cpython@7ef909c · GitHub
Skip to content

Commit 7ef909c

Browse files
committed
Fix for issue 14725 for 3.2 branch
1 parent 16f6f83 commit 7ef909c

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

Lib/multiprocessing/connection.py

Lines changed: 4 additions & 1 deletion

Lib/test/test_multiprocessing.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,23 @@ def test_listener_client(self):
17321732
self.assertEqual(conn.recv(), 'hello')
17331733
p.join()
17341734
l.close()
1735+
1736+
def test_issue14725(self):
1737+
l = self.connection.Listener()
1738+
p = self.Process(target=self._test, args=(l.address,))
1739+
p.daemon = True
1740+
p.start()
1741+
time.sleep(1)
1742+
# On Windows the client process should by now have connected,
1743+
# written data and closed the pipe handle by now. This causes
1744+
# ConnectNamdedPipe() to fail with ERROR_NO_DATA. See Issue
1745+
# 14725.
1746+
conn = l.accept()
1747+
self.assertEqual(conn.recv(), 'hello')
1748+
conn.close()
1749+
p.join()
1750+
l.close()
1751+
17351752
#
17361753
# Test of sending connection and socket objects between processes
17371754
#

Modules/_multiprocessing/win32_functions.c

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)