From: lace <> Date: Tue, 10 Jul 2007 21:50:51 +0000 (+0000) Subject: Fixed a bug of uninitialized TERMIOS. X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=248a8e7c2aa8ff557ce54b597658596d7c7a0211 Fixed a bug of uninitialized TERMIOS. --- diff --git a/src/orphanripper.c b/src/orphanripper.c index cf3039f..7bea08d 100644 --- a/src/orphanripper.c +++ b/src/orphanripper.c @@ -86,6 +86,13 @@ static int spawn (char **argv) assert (i == 0); /* With TERMP passed as NULL we get "\n" -> "\r\n". */ + termios.c_iflag = IGNBRK | IGNPAR; + termios.c_oflag = 0; + termios.c_cflag = CS8 | CREAD | CLOCAL | HUPCL | B9600; + termios.c_lflag = IEXTEN | NOFLSH; + memset (termios.c_cc, _POSIX_VDISABLE, sizeof (termios.c_cc)); + termios.c_cc[VTIME] = 0; + termios.c_cc[VMIN ] = 1; cfmakeraw (&termios); #ifdef FLUSHO /* Workaround a readline deadlock bug in _get_tty_settings(). */