Skip to content
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

gh-129205: Use os.readinto() in subprocess errpipe_read #129498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmaloney
Copy link
Contributor

@cmaloney cmaloney commented Jan 31, 2025

Read into a pre-allocated fixed size buffer.

The previous code the buffer could actually get to 100_000 bytes in two reads (first read returns 50_000, second pass through loop gets another 50_000), so this does change behavior. I think the fixed length of 50_000 was the intention though. This is used to pass exception issues that happen during _fork_exec from the child to parent process.

Read into a pre-allocated fixed size buffer.

The previous code the buffer could actually get to 100_000 bytes in two
reads (first read returns 50_000, second pass through loop gets another
50_000), so this does change behavior. I think the fixed length of
50_000 was the intention though. This is used to pass exception issues
that happen during _fork_exec from the child to parent process.
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.

1 participant