You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your suggestion seems to be correct. To guarantee that a write operation is atomic, the length of msg has to be less than or equal to PIPE_BUF(the kernel pipe buffer size).
According to this page, the minimum acceptable value of PIPE_BUF is set to 512 bytes in POSIX system , so checking if len(msg) is not greater than 512 is enough.
Activity
saito828koki commentedon Sep 17, 2022
@grgsrs
Thanks for your report!
Your suggestion seems to be correct. To guarantee that a write operation is atomic, the length of
msg
has to be less than or equal toPIPE_BUF
(the kernel pipe buffer size).According to this page, the minimum acceptable value of
PIPE_BUF
is set to 512 bytes in POSIX system , so checking iflen(msg)
is not greater than 512 is enough.I will create a PR for this issue.
grgsrs commentedon Sep 17, 2022
gh-96819: multiprocessing.resource_tracker: check if length of pipe w…
pythongh-96819: multiprocessing.resource_tracker: check if length of …
pythongh-96819: multiprocessing.resource_tracker: check if length of …
gh-96819: multiprocessing.resource_tracker: check if length of pipe w…
gh-96819: multiprocessing.resource_tracker: check if length of pipe w…
Merge branch 'main' into dictwatch