-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
PIPE_BUF is invalid on AIX #54071
Comments
On AIX, the test test_communicate_pipe_buf in test_subprocess will hang forever (in py3k and py27): test_communicate_pipe_buf (main.ProcessTestCase) ... File "Lib/test/test_subprocess.py", line 386, in test_communicate_pipe_buf The comment in this test indicates: So I guess it means communicate() does not work properly on AIX. |
The problem does not happen with Python 2.6.
When forcing PIPE_BUF to 512 in selectmodule.c, the test will pass. |
PIPE_BUF in unistd.h is defined to 32768. The test works with PIPE_BUF changed up to 6144 but won't work with 7168. We could probably use 4096 as a safe value for faster result if needed. Here is my patch which has been verified to work OK and should be applied to py3k and py27. |
Removing select.PIPE_BUF does not seem a good idea to me because this breaks compatibility. I suggest to simply set it to 512 on AIX. (An ideal solution would be to really determine the actual buffer size in ./configure; this is probably overkill) |
OK for me. |
Committed to py3k in r85554, 2.7 in r85556. Sébastien, from what you say it sounds like this does not apply to 3.1, so I blocked it there. If this is incorrect let me know and I'll backport it. |
Thanks R. David. I checked in 3.1 and PIPE_BUF is not defined in the select module, so the default value of 512 is used in subprocess. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: