Skip to content

Commit

Permalink
Add a comment about the fd recv acks.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpshead committed Sep 24, 2024
1 parent 0119b6a commit ab9f93d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/multiprocessing/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' %
Expand Down

0 comments on commit ab9f93d

Please sign in to comment.