Experimental Physics and
| |||||||||||||||||
|
(conversation seems to have jumped threads... not sure why) On Sat, May 4, 2019 at 1:35 PM Michael Davidsaver via Tech-talk <[email protected]> wrote: On 5/4/19 8:29 AM, Matt Newville wrote:> I think we want to avoid using RTLD_GLOBAL. That's probably especially true when embedded in an application that is loading and using libca itself. Libraries loaded during normal process start behave as RTLD_GLOBAL. Yes, it appears to return True when the application has that shared lib loaded when the Python interpreter is created (or initialized -- don't know that it matters here but maybe, and maybe that depends on details of how pyDevSup works). I think that is why it might be useful. FWIW, I don't think we want to use getattr(cdll.LoadLibrary(None), 'ca_context_cache', None) as the normal way to look up the `ca_context_cache` function when `lbca.ca_context_create` will do.
I am completely willing to believe we would need to do this (or something like it) in order to use pyepics embedded in an IOC. Apparently it has not been needed when running as a normal Python process. There might be no harm in always registering an exit handler, but it might require some code changes and testing to do so. We don't want the "normal" non-embedded case worse. That's why a test of "was libca loaded by an enclosing process" might be useful. I've not yet used pyDevSup myelf, but trying to make pyepics work in a python process embedded in an IOC sounds like a fine idea to me. Currently, pyepics is not testing that. I could be wrong, but it looks to me like pyDevSup isn't testing the use of pyepics. Without such tests, I don't think it is really sensible to expect this combination to work without some real effort. --Matt
| ||||||||||||||||
ANJ, 06 May 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |