Am Freitag, 13. Mai 2011, um 02:07:20 schrieb Ernest L. Williams Jr.:
> Till Straumann wrote:
> > On 05/12/2011 05:22 PM, Zelazny, Michael Stanley wrote:
> >> If, for example, dbLoadRecords, initializing some hardware module,
> >> cd("some/dir"), etc. fails while an IOC is booting, is there any way to
> >> trap this in my st.cmd and take an action, such as abort the IOC boot?
> >
> > Under RTEMS (cexpsh shell -- every line is a C expression)
> > you can easily do that (provided that the routine you want to trap
> > returns a status)
> >
> > dbLoadRecords(...) && bsp_reset()
> >
> > will reset the board if dbLoadRecords() returns
> > a non-zero value.
> >
> > However, rebooting is maybe not the best way to
> > handle this since you will most likely end up in
> > an endless loop (since the error condition doesn't
> > go away with a reboot).
>
> What we really want is for the whole process to just stop.
> For example, in RTEMS if there is an undefined symbol the system errors
> out and stops.
> Or is that vxWorks, I am thinking of?
If I remember correctly, I have once done this for VxWorks by calling
exit(EXIT_FAILURE). This will abort the shell task and the boot process stops.
It will, however, not stop other tasks that have aleady been started, so is
useful only until shortly before iocInit completes.
Cheers
Ben
________________________________
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ührer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c. Wolfgang Eberhardt, Dr. Ulrich Breuer
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- Replies:
- Re: Handling failures in st.cmd Till Straumann
- References:
- Handling failures in st.cmd Zelazny, Michael Stanley
- Re: Handling failures in st.cmd Till Straumann
- Re: Handling failures in st.cmd Ernest L. Williams Jr.
- Navigate by Date:
- Prev:
Re: Handling failures in st.cmd Ernest L. Williams Jr.
- Next:
Re: Handling failures in st.cmd Till Straumann
- 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: Handling failures in st.cmd Ernest L. Williams Jr.
- Next:
Re: Handling failures in st.cmd Till Straumann
- 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
|