On 4/29/19 8:32 AM, Ralph Lange via Tech-talk wrote:
>
>
> On Mon, 29 Apr 2019 at 17:02, Johnson, Andrew N. via Tech-talk <[email protected] <mailto:[email protected]>> wrote:
>
>
> 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.
>
>
> Sounds dangerous...
> I would rather have a new API for the shell commands (allowing return codes) and a glue layer for the existing (old API) commands that returns 0 in the new API.
The registration/call API certainly could use improvement (cf. my previous mail about pv/iocshelper.h).
A less invasive, and more flexible, approach would use a thread local to allow
knowledgeable functions to set a return value, and maybe a message. This would
probably be wrapped in a function.
Something like 'iocshSetError(long code, const char* msg)'.
Attachment:
signature.asc
Description: OpenPGP digital signature
- 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
- Re: Stopping IOC boot on failure to load database Johnson, Andrew N. via Tech-talk
- Re: Stopping IOC boot on failure to load database Ralph Lange via Tech-talk
- Navigate by Date:
- 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 Jeong Han Lee 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
<2019>
2020
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 Benjamin Franksen 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
<2019>
2020
2021
2022
2023
2024
|