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: "Konrad, Martin via Tech-talk" <tech-talk@aps.anl.gov>
To: "Zelazny, Michael Stanley via Tech-talk" <tech-talk@aps.anl.gov>
Date: Wed, 26 Jun 2019 21:58:21 +0000
Hi Kay,
> date()
> exit()
> 
> the date is printed, but instead of then exiting, I get the "epics>"
> prompt.
I recently ran into the same issue. I actually intended to see if this
can be changed without any negative consequences. The IOC shell code
actually handles "exit" a bit weird - it just returns rather than
shutting down [1]. Returning is not sufficient since IOC applications
usually contain something like

iocsh(argv[1]);
iocsh(NULL);

The first line processes the st.cmd file and returns when it finds an
"exit" line. The second line results in an interactive shell session.

> IOCAdmin EPICS Module has a PV called $(IOC):SYSRESET that you could>
> dbpf after your sleep.
Unfortunately iocStats is not available with the softIOC executable.

My use case:

iocInit()
system('python3 test.py') # writes test output to test.tap
exit()

We are running something like this on our CI server.

-Martin

[1]
https://github.com/epics-base/epics-base/blob/7.0/modules/libcom/src/iocsh/iocsh.cpp#L819

-- 
Martin Konrad
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: konrad@frib.msu.edu


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

Navigate by Date:
Prev: Re: How is 'exit()' different for the IOC shell? Johnson, Andrew N. via Tech-talk
Next: Beckhoff BK9000 support survey Dunning, Michael 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? Johnson, Andrew N. 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 ·