Skip to content

gh-129205: Update multiprocessing.forkserver to use os.readinto #129425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

cmaloney
Copy link
Contributor

@cmaloney cmaloney commented Jan 29, 2025

Use a single pre-allocated bytearray for temporary storage, os.readinto it avoiding non-mutable bytes.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just suggest to remove the NEWS entry.

@@ -0,0 +1,2 @@
:mod:`multiprocessing` forkserver now uses :func:`os.readinto` to read pid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that it's worth it to document this change to end users. I suggest to remove this NEWS entry.

@vstinner vstinner enabled auto-merge (squash) January 30, 2025 22:02
@vstinner vstinner merged commit 10ee2d9 into python:main Jan 30, 2025
40 checks passed
@cmaloney cmaloney deleted the cmaloney/forkserver_read_signed branch January 30, 2025 22:26
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants