EPICS Controls 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  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS server won't boot when there is no newline at the ending of st.cmd
From: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: 黄佳伟 <[email protected]>, EPICS Tech Talk <[email protected]>
Date: Tue, 19 Nov 2019 17:16:08 +0000
Hi Jasper,

On 11/19/19 7:18 AM, 黄佳伟 via Tech-talk wrote:
    I've been dealing with a bug for several days. I used my own st.cmd with modbusApp. The ioc shell did appear but the welcome words of EPICS like:
Starting iocInit
############################################################################
## EPICS R3.16.2-DEV
## EPICS Base built Dec 27 2018
############################################################################
iocRun: All initialization complete
are missing. The EPICS server does not boot and i can't approach pvs by caget and caput.
    Now I find the reason. There was no newline after the `iocInit` command in my st.cmd. When I add a newline at the ending of st.cmd, It works.
    So, is this a bug? Why is a new line needed at the ending of `st.cmd`?
EPICS relies on the Posix standard for many things, and when a stream of characters doesn't end in a newline it isn't classified as a line of text according to Posix, see this stack-overflow answer.

The lines in a st.cmd file are interpreted by the IOC Shell, iocsh, which also handles commands that are typed in from the IOC console using exactly the same code. The API in libCom that we use for that interfaces with GNU readline and other line-editing libraries so the IOC console can support command-line recall and editing, and what the specific library in use does when it gets an EOF directly affects how the iocsh behaves.

I don't see this as a bug myself, but EPICS is Open Source and you are welcome to develop and propose a change to the code in Base to fix it if you wish.

- Andrew
-- 
Complexity comes for free, Simplicity you have to work for.

References:
EPICS server won't boot when there is no newline at the ending of st.cmd 黄佳伟 via Tech-talk

Navigate by Date:
Prev: RE: Uploading a file with SFTP from an EPICS driver - Issue fixed! Mark Rivers via Tech-talk
Next: Re: EPICS Codeathon 2020 Johnson, Andrew N. 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  2021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS server won't boot when there is no newline at the ending of st.cmd 黄佳伟 via Tech-talk
Next: RE: Uploading a file with SFTP from an EPICS driver - Issue fixed! Mark Rivers 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  2021  2022  2023  2024 
ANJ, 19 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·