Fix initialization of vmin. This has caused script(1) to exit immediatly

when started inside an xterm that started with vmin=0 (because it had
no tty to inherit the correct value from). ok kettenis@, krw@, oga@.
This commit is contained in:
matthieu 2008-02-24 22:22:48 +00:00
parent e2e723ac91
commit ef3b0a0644

View File

@ -1866,10 +1866,6 @@ main(int argc, char *argv[]ENVP_ARG)
#ifndef USE_TERMIOS /* { */
d_tio.c_line = 0;
#endif /* } */
#if defined(USE_TERMIOS) || defined(USE_POSIX_TERMIOS) /* { */
d_tio.c_cc[VMIN] = 1;
d_tio.c_cc[VTIME] = 0;
#endif /* } */
#ifdef HAS_LTCHARS /* { */
d_ltc.t_suspc = CSUSP; /* t_suspc */
d_ltc.t_dsuspc = CDSUSP; /* t_dsuspc */
@ -1932,6 +1928,10 @@ main(int argc, char *argv[]ENVP_ARG)
}
}
}
#if defined(USE_TERMIOS) || defined(USE_POSIX_TERMIOS) /* { */
d_tio.c_cc[VMIN] = 1;
d_tio.c_cc[VTIME] = 0;
#endif /* } */
#ifdef HAS_LTCHARS /* { */
d_ltc.t_suspc = CharOf('\000'); /* t_suspc */
d_ltc.t_dsuspc = CharOf('\000'); /* t_dsuspc */