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  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 
<== Date ==> <== Thread ==>

Subject: Re: How is 'exit()' different for the IOC shell?
From: "Kasemir, Kay via Tech-talk" <tech-talk@aps.anl.gov>
To: techtalk <tech-talk@aps.anl.gov>
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

Found one quirk..
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

Replies:
Re: How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk
References:
How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk
Re: How is 'exit()' different for the IOC shell? Konrad, Martin via Tech-talk
Re: How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: Re: How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk
Next: Re: How is 'exit()' different for the IOC shell? Kasemir, Kay 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 
Navigate by Thread:
Prev: Re: How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk
Next: Re: How is 'exit()' different for the IOC shell? Kasemir, Kay 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 
ANJ, 27 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·