Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  07 May 2009, Konstantin Olchanski, Bug Report, odbedit bad ctrl-C 
    Reply  04 Jun 2009, Stefan Ritt, Bug Report, odbedit bad ctrl-C 
Message ID: 575     Entry time: 07 May 2009     Reply to this: 588
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: odbedit bad ctrl-C 
When using "/bin/bash" shell, if I exit odbedit (and other midas programs) using ctrl-C, the terminal 
enters a funny state, "echo" is turned off (I cannot see what I type), "delete" key does not work (echoes 
^H instead).

This problem does not happen if I exit using the "exit" command or if I use the "/bin/tcsh" shell.

When this happens, the terminal can be restored to close to normal state using "stty sane", and "stty 
erase ^H".

The terminal is set into this funny state by system.c::getchar() and normal settings are never restored 
unless the midas program calls getchar(1) at the end. If the program does not finish normally, original 
terminal settings are never restored and the terminal is left in a funny state.

It is not clear why the problem does not happen with /bin/tcsh - perhaps they restore sane terminal 
settings automatically for us.
K.O.
ELOG V3.1.4-2e1708b5