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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: How to run IOC in docker containers properly |
From: | "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov> |
To: | xiao zhang <zxinmyth at gmail.com> |
Cc: | EPICS tech-talk <tech-talk at aps.anl.gov> |
Date: | Mon, 15 Jun 2020 17:43:24 +0000 |
Hi,
On Jun 15, 2020, at 2:23 AM, xiao zhang via Tech-talk <tech-talk at aps.anl.gov> wrote:
I can’t help you with the container side at all, but it is possible to build an IOC that doesn’t start the IOC shell, or if you’re using one of the softIoc executables, tell that to not start the shell. In both cases though the IOC keeps its stdin, stdout
and stderr streams open, and it will continue to send messages to stdout/stderr.
If you’re building your own application binary, you have to edit your <app>App/src/<app>Main.cpp file, remove the line
iocsh(NULL) and replace the call to
epicsExit(0) with a call to epicsThreadExitMain().
If you’re running the softIoc or softIocPVA executable from Base, you can pass that the flag
-S (that’s an upper-case letter ’s’ to do the same thing as the above.
The result isn’t really any lighter-weight from the IOC’s perspective though, it just means you will have no ability to interact with the IOC while it’s running except through CA (or PVA). You can’t close stdin, send Control-C through it or use
kill -QUIT to stop it, you have to use a
kill -9 (SIGKILL) to make it die.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|