summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/ChangeLog7
-rw-r--r--src/appl/bsd/login.c15
2 files changed, 18 insertions, 4 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index 148886cd0..f7321f555 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,10 @@
+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
diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c
index 958fb2342..d32f6fc94 100644
--- a/src/appl/bsd/login.c
+++ b/src/appl/bsd/login.c
@@ -399,17 +399,24 @@ int main(argc, argv)
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);