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  <20152016  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: epicsExit (); function exits the IOC but the Linux console requires a resest to be operative
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Tue, 30 Jun 2015 13:25:01 -0500
Hi Diego,

On 06/30/2015 08:50 AM, Diego Sanz wrote:
> When my IOC application find a situation that I want it to be finished,
> which is the best way to do it? I have used epicsExit(0), and the
> function that I registered for exit is executed correctly, but when the
> IOC shell ends, the console requires to write "reset" command to recover
> the echo of the console, and its correct working. Is there any reason
> for this? is it normal?

This is happening because your iocsh is waiting for keyboard characters
inside GNU readline, which has modified the terminal settings to allow
it to manage the user experience. I assume you must be executing the
epicsExit(0) routine in some other thread, and unfortunately this is
currently the result of killing the iocsh thread like that.

I can think of a few ways around the problem, at least one of which we
ought to implement, but it would be simplest for you to start the IOC
from a script which runs 'stty sane' immediately after the IOC exits.
That command should be sufficient and is a little less severe than a
full terminal reset.

HTH,

- Andrew

-- 
Light thinks it travels faster than anything but it is wrong.
No matter how fast light travels, it finds the darkness has
always got there first, and is waiting for it.
    -- Terry Pratchett, Reaper Man

Replies:
Re: epicsExit (); function exits the IOC but the Linux console requires a resest to be operative Andrew Johnson
References:
epicsExit (); function exits the IOC but the Linux console requires a resest to be operative Diego Sanz

Navigate by Date:
Prev: RE: autosave ---Data coverage Mooney, Tim M.
Next: Re: epicsExit (); function exits the IOC but the Linux console requires a resest to be operative Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: epicsExit (); function exits the IOC but the Linux console requires a resest to be operative Michael Davidsaver
Next: Re: epicsExit (); function exits the IOC but the Linux console requires a resest to be operative Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·