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

bpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). #11765

Merged
merged 4 commits into from
Feb 8, 2019

Conversation

nascheme
Copy link
Member

@nascheme nascheme commented Feb 5, 2019

The logic in setup.py that determines if _multiprocessing/posixshmem.c should get built is not very robust. I think it is better to use autoconfig to probe for the required functions and libraries. My autoconfig brain cells are a bit fuzzy but I think my patch is correct.

I look for shm_open and shm_unlink. I also check if librt is required for these functions.

https://bugs.python.org/issue35903

AC_SEARCH_LIBS will execute the success clause even if -lrt is not
needed.  So, check the result and define HAVE_RT_SHM_OPEN only if
linking with -lrt is really needed.
@applio
Copy link
Member

applio commented Feb 6, 2019

That looks like a winner to me.

Given all the other discussions going on around shared memory at the moment, it might be worth holding off merging right away... or would that actually be counter-productive?

@nascheme
Copy link
Member Author

nascheme commented Feb 7, 2019

I would be inclined to merge. It is easy to back out if needed but I think it makes things better. I understand the plan is to not revert your e5ef45b change.

@nascheme nascheme merged commit 5741c45 into python:master Feb 8, 2019
@bedevere-bot
Copy link

@nascheme: Please replace # with GH- in the commit message next time. Thanks!

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.

4 participants