restore terminal attribute before reopen with initial input just to be sure - sob - simple output bar
 (HTM) git clone git://git.codemadness.org/sob
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 9e7f1e78806716bc893701b50b29cd791489015d
 (DIR) parent 874a6329096155b854a387dcc1a5d73f738cdff0
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri, 24 Oct 2014 22:12:47 +0000
       
       restore terminal attribute before reopen with initial input just to be sure
       
       Diffstat:
         M sob.c                               |       3 +++
       
       1 file changed, 3 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/sob.c b/sob.c
       @@ -908,6 +908,9 @@ initialinput(void)
                        buf[r] = '\0';
                        handleinput(buf, r);
                }
       +        /* restore terminal attributes. */
       +        ttystate.c_lflag = ttysave.c_lflag;
       +        tcsetattr(STDIN_FILENO, TCSANOW, &ttystate);
                /* close and reattach to stdin */
                close(STDIN_FILENO);
                if((fd = open("/dev/tty", O_RDONLY | O_NONBLOCK)) == -1) {