+Wed Jul 5 20:03:37 1995 Theodore Y. Ts'o (tytso@dcl)
+
+ * login.c (main): Don't use the TIOCLSET ioctl unless we're not
+ using POSIX_TERMIOS. Don't just blindly set the file
+ status flags to 0. Instead, do a fcntl(0, F_GETFL), and
+ then reset the nonblocking flags.
+
Sun Jul 2 19:48:27 1995 Sam Hartman <hartmans@tertius.mit.edu>
* krcp.c: make errno extern
if (*argv)
username = *argv;
-#if !defined(_AIX)
+#if !defined(POSIX_TERMIOS) && defined(TIOCLSET)
ioctlval = 0;
-#ifdef TIOCLSET
- /* linux, sco don't have this line discipline interface */
+ /* Only do this we we're not using POSIX_TERMIOS */
(void)ioctl(0, TIOCLSET, (char *)&ioctlval);
#endif
+
#ifdef TIOCNXCL
(void)ioctl(0, TIOCNXCL, (char *)0);
#endif
- (void)fcntl(0, F_SETFL, ioctlval);
+
+ ioctlval = fcntl(0, F_GETFL);
+#ifdef O_NONBLOCK
+ ioctlval &= ~O_NONBLOCK;
+#endif
+#ifdef O_NDELAY
+ ioctlval &= ~O_NDELAY;
#endif
+ (void)fcntl(0, F_SETFL, ioctlval);
#ifdef POSIX_TERMIOS
(void)tcgetattr(0, &tc);