On Tuesday 21 September 2010 05:50:20 Dmitry Teytelman wrote:
>
> > It would be great if you opened a bug report against the Launchpad bug
> > tracker for EPICS Base [1] to report this issue. (And maybe even file a
> > patch if you were able to fix it.) Thanks a lot!
>
> Done (with a patch).
Thanks, I will include an equivalent change in R3.14.12, or maybe something a
little more radical depending on any answers to the following question:
Can anyone (other than Dmitry!) remember/explain why to ignore the SIGHUP and
SIGPIPE signals, we install our own null handlers (which then have to call any
already-installed handler, but that's broken if they specify SA_SIGINFO)
rather than just setting SIG_IGN if the current handler is SIG_DFL? I'm
thinking something like this would be much simpler and seems to work:
epicsShareFunc void epicsShareAPI epicsSignalInstallSigHupIgnore (void)
{
struct sigaction curAction;
int status = sigaction(SIGHUP, NULL, &curAction);
if (status >=0 &&
curAction.sa_handler == SIG_DFL) {
curAction.sa_handler = SIG_IGN;
status = sigaction(SIGHUP, &curAction, NULL);
}
if (status < 0) {
fprintf(stderr, "%s: SIGHUP action failed, %s\n",
__FILE__, strerror(errno));
}
}
Note that our existing code is not thread-safe either, this routine is called
once in iocInit().
- Andrew
--
The best FOSS code is written to be read by other humans -- Harald Welte
- Navigate by Date:
- Prev:
Re: sequencer beta release Matthias Clausen
- Next:
Re: sequencer beta release Ben Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Dynamic Loading and Unloading of EPICS Device Support and Record. Marty Kraimer
- Next:
[Merge] lp:~epics-core/epics-base/apple-ios into lp:epics-base Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|