EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: firewalld configuration for EPICS?
From: Michael Davidsaver via Tech-talk <[email protected]>
To: "Zimoch Dirk (PSI)" <[email protected]>, "Hu, Yong" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Sat, 4 May 2019 11:34:26 -0700
On 5/4/19 8:29 AM, Matt Newville wrote:> 
...
> OK, thanks -- that might be useful. To be clear, this returns False for me in the "normal" case of actually loading `libca` for the first time from a Python session:

This depends on how LoadLibrary() is calling dlopen().  cf. RTLD_LOCAL vs. RTLD_GLOBAL.
The default is RTLD_LOCAL.  fyi. this is actually controllable with
sys.setdlopenflags(), though I've not tried changing this myself.

Libraries loaded during normal process start behave as RTLD_GLOBAL.

> $ softIocPy2.7
> epics> py "from ctypes import cdll"
> epics> py "print hasattr(cdll.LoadLibrary(None), 'ca_context_create')"
> True


> So that might be a reliable way to answer the question "am I running as an embedded Python within an IOC-like process that has loaded libca?".  That would be good to know.  Registering epicsAtExit() might be useful in all cases, but it seems like we might really need to do that when embedded in an IOC.

Since libca is registering its own exit handler pyepics would want to
do the same (after ca context creation) to avoid racing against this
cleanup when epicsExit() is called.

Replies:
Re: firewalld configuration for EPICS? Matt Newville via Tech-talk
References:
firewalld configuration for EPICS? Dirk Zimoch via Tech-talk
Re: firewalld configuration for EPICS? Jörn Dreyer via Tech-talk
Re: firewalld configuration for EPICS? Dirk Zimoch via Tech-talk
Re: firewalld configuration for EPICS? Benjamin Franksen via Tech-talk
Re: firewalld configuration for EPICS? Dirk Zimoch via Tech-talk
Re: firewalld configuration for EPICS? Benjamin Franksen via Tech-talk
Re: firewalld configuration for EPICS? Dirk Zimoch via Tech-talk
Re: firewalld configuration for EPICS? Hu, Yong via Tech-talk
Re: firewalld configuration for EPICS? Zimoch Dirk (PSI) via Tech-talk

Navigate by Date:
Prev: Re: firewalld configuration for EPICS? Zimoch Dirk (PSI) via Tech-talk
Next: Device sending continuously Data Benjamin Hetz via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: firewalld configuration for EPICS? Zimoch Dirk (PSI) via Tech-talk
Next: Re: firewalld configuration for EPICS? Matt Newville via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 05 May 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·