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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: How is 'exit()' different for the IOC shell? |
From: | "Kasemir, Kay via Tech-talk" <[email protected]> |
To: | techtalk <[email protected]> |
Date: | Thu, 27 Jun 2019 18:10:00 +0000 |
> Turns out Michael Davidsaver has a solution...
> In EPICS 7.0.2.2, the softIocPVA includes an '-x' option that adds an exit and BaseVersion record to the IOC
> softIocPVA -x blah selfdestruct.cmd > with this in selfdestruct.cmd will exit the IOC after 5 seconds: dbLoadRecords("tick.db") iocInit() epicsThreadSleep(5) dbpf "blah:exit" 0 The -x option already calls iocInit, so cannot load more databases nor call iocInit in the command file.
This works:
softIocPVA -x blah -m MACRO=value -d whatever.db selfdestruct.cmd
with
selfdestruct.cmd then just
epicsThreadSleep(5)
dbpf "blah:exit" 0 So to test a periodically dropping IOC:
while true
do
softIocPVA -x blah -m MACRO=value -d whatever.db selfdestruct.cmd
sleep 1
done
Thanks,
Kay
|