EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Proglem doing CA calls after catching a signal
From: Eric Norum <[email protected]>
To: Chris Timossi <[email protected]>, Robert Soliday <[email protected]>, [email protected], Jeff Hill <[email protected]>
Date: Wed, 21 Jul 2004 13:14:22 -0500
Chris Timossi wrote:
To be honest, I dont know if it's safe for a signal handler to join a thread context. There's at least one possible race condition in this case: the signal handler could execute after ca_task_exit() has been called. What other race conditions are you thinking about?

The POSIX documentation I've found includes neither pthread_setspecific nor pthread_getspecific in the list of routines safe to call from a signal handler. For example, the Solaris documentation describes these routines as MT-Safe, but not as Async-Signal-Safe. Given this, I would say that ca_current_context and ca_attach_context should not be called from a signal handler since they end up calling the pthread routines.


Can anybody with access to the POSIX standard check and confirm the unsafe nature of the pthread_[set/get]specific() routines?


I'm sure Jeff will weigh in when he gets back.



That may be a while since he's currently caught up in the security situation at Los Alamos.


--
Eric Norum                                 [email protected]
Advanced Photon Source                     Phone: (630) 252-4793
Argonne National Laboratory


References:
Proglem doing CA calls after catching a signal Robert Soliday
Re: Proglem doing CA calls after catching a signal Robert Soliday
Re: Proglem doing CA calls after catching a signal Eric Norum
Re: Proglem doing CA calls after catching a signal Chris Timossi

Navigate by Date:
Prev: CGI Export wtw00992
Next: Re: CGI Export Maren Purves
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Proglem doing CA calls after catching a signal Chris Timossi
Next: CGI Export wtw00992
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·