From f109f4b02d448b9d5ff73c341bbda023582b3eef Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 14 Jan 2013 16:43:40 +0100 Subject: [PATCH] Noux: initialize the 'termios' structure Fixes #614. --- ports/src/lib/libc_noux/plugin.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/src/lib/libc_noux/plugin.cc b/ports/src/lib/libc_noux/plugin.cc index d999419d5f..662e1da259 100644 --- a/ports/src/lib/libc_noux/plugin.cc +++ b/ports/src/lib/libc_noux/plugin.cc @@ -949,11 +949,18 @@ namespace { PDBG("TIOCGETA - argp=0x%p", argp); ::termios *termios = (::termios *)argp; + termios->c_iflag = 0; + termios->c_oflag = 0; + termios->c_cflag = 0; /* * Set 'ECHO' flag, needed by libreadline. Otherwise, echoing * user input doesn't work in bash. */ termios->c_lflag = ECHO; + memset(termios->c_cc, _POSIX_VDISABLE, sizeof(termios->c_cc)); + termios->c_ispeed = 0; + termios->c_ospeed = 0; + return 0; }