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: Stopping IOC boot on failure to load database
From: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 29 Apr 2019 15:01:54 +0000
On 4/29/19 6:16 AM, Ralph Lange via Tech-talk wrote:
On Mon, 29 Apr 2019 at 13:10, Benjamin Franksen via Tech-talk <[email protected]> wrote:

I like the idea. In fact, I would like to have a way to stop execution
of the startup script whenever /any/ of its commands fail, not only
loading databases.

Would be great. But as iocShell commands do not have return values that is hard to achieve. At least without breaking compatibility.

Related: there's been an idea for years to (optionally) replace the iocShell with an embedded Lua engine to get a "real" scripting language onto the IOC. Work waiting to be done...

Actually that functionality already exists, there is a lua shell in the synApps lua module which can be used instead of iocsh. However it suffers from the same problem of failing commands as the iocShell does, because it re-uses the iocsh command API (provided you're using 3.15.6 or later, when Keenan the APIs needed to get to the registered command-set and variables).

We might be able to add a routine to iocsh that replicates the VxWorks shellScriptAbort() routine; calling that aborts the current VxWorks target shell and stops reading the startup script. I haven't studied how it works on VxWorks, but my guess is that on entry the shell calls setjmp(), and the abort routine calls longjmp() to return to that context again and clean up. I could see that as a possible cause of lost resources if we're not careful though.

- Andrew
-- 
Complexity comes for free, Simplicity you have to work for.

Replies:
Re: Stopping IOC boot on failure to load database Ralph Lange via Tech-talk
References:
Stopping IOC boot on failure to load database Paduan Donadio, Marcio via Tech-talk
Re: Stopping IOC boot on failure to load database Benjamin Franksen via Tech-talk
Re: Stopping IOC boot on failure to load database Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: gen_iocsh_reg.pl Michael Davidsaver via Tech-talk
Next: Re: Stopping IOC boot on failure to load database Ralph Lange 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: Stopping IOC boot on failure to load database Ralph Lange via Tech-talk
Next: Re: Stopping IOC boot on failure to load database Ralph Lange 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, 29 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·