2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: IOC Threads blocking all signals |
From: | "Johnson, Andrew N. via Core-talk" <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Wed, 19 Jun 2019 16:33:34 +0000 |
On 6/19/19 10:29 AM, Ralph Lange via Core-talk wrote:I concur with Eric's memory. I believe that before we did that a signal to the IOC process could get picked up by *any* thread, many of which were unprepared for the possibility. When a specific thread wants to respond to a signal it should be explicitly enabling it anyway.
The child side of the fork() call needs to re-enable the default signal handling before it calls exec(), I think Eric suggested that too. There are of course horror stories about mixing threads and fork(): https://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them Any sockets opened using the epicsSocketCreate() or epicsSocketAccept() routines do have the FD_CLOEXEC flag set so they are protected, which should cover most network FDs (IOC, Asyn etc.). - Andrew -- Complexity comes for free, Simplicity you have to work for. |