From ab9f93dada34e02ebedbabc4ef007b99d545ac52 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google LLC]" Date: Tue, 24 Sep 2024 00:25:38 +0000 Subject: [PATCH] Add a comment about the fd recv acks. --- Lib/multiprocessing/reduction.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/multiprocessing/reduction.py b/Lib/multiprocessing/reduction.py index c282d865a85df3..fcccd3eef86cc7 100644 --- a/Lib/multiprocessing/reduction.py +++ b/Lib/multiprocessing/reduction.py @@ -155,6 +155,10 @@ def recvfds(sock, size): if not msg and not ancdata: raise EOFError try: + # We send/recv an Ack byte after the fds to work around an old + # macOS bug; it isn't clear if this is still required but it + # makes unit testing fd sending easier. + # See: https://github.com/python/cpython/issues/58874 sock.send(b'A') # Acknowledge if len(ancdata) != 1: raise RuntimeError('received %d items of ancdata' %