On Wednesday 19 November 2014 10:59:10 Ralph Lange wrote:
> Since Michael had to take back some of the epicsExit() changes, I was
> thinking about how to do a smooth transition to a smarter IOC
> shutdown/restart.
>
> This is coming back to a suggestion that Andrew had a few months back:
> Do we need a staged shutdown process with hooks for each stage -
> similar to the initHooks mechanism?
>
> At that point there would also be a clearer definition of which stages
> are shut down for a "hot standby" or a "warm complete restart" of the
> IOC.
>
> Maybe the module could also declare its name and functionalities, e.g.
> as an or'ed mask of features like "supports_standby",
> "supports_restart", "supports_link_change", etc so that the IOC core
> can decide if and how to do restart/shutdown and can provide better
> diagnostics.
>
> So that instead of simply setting
> epicsAtExit(func, arg);
>
> a module would set things along the line of
> id = epicsExitRegister("myModule",
> supports_standby|supports_restart); epicsAddExitHook(id,
> EXIT_BEFORE_CORE, func1, arg1);
> epicsAddExitHook(id, EXIT_BEFORE_SERVER, func2, arg2);
> epicsAddExitHook(id, EXIT_BEFORE_DBSCAN, func3, arg3);
> epicsAddExitHook(id, EXIT_BEFORE_ERRLOG, func4, arg4);
>
> Compatibility - epicsAtExit could do
> {
> bla = epicsExitRegister("$$filename$$", 0);
> epicsAddExitHook(bla, EXIT_BEFORE_CORE, func, arg);
> }
>
> What do you think?
Hi Ralph
Yes, definitely. Make the dependencies and the relative order explicit.
Even though it does add more code, such a change makes the whole
shutdown thing more predictable and easier to reason about.
Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- References:
- Shutdown issues Ralph Lange
- Navigate by Date:
- Prev:
Shutdown issues Ralph Lange
- Next:
Re: FW: Incorrect Timestamp in aSubRecord 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
2025
- Navigate by Thread:
- Prev:
Shutdown issues Ralph Lange
- Next:
Re: FW: Incorrect Timestamp in aSubRecord 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
2025
|