when getty emits its first prompt, it flushes typeahead beforehand.

login (which emits the later prompts) does not.

any reason is shouldn't?

paul

--- loginutils/login.c  5 Nov 2007 13:45:40 -0000       1.1
+++ loginutils/login.c  5 Nov 2007 16:59:40 -0000
@@ -291,6 +291,10 @@
        openlog(applet_name, LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH);
 
        while (1) {
+
+               /* flush away any type-ahead (as getty does) */
+               (void) ioctl(0, TCFLSH, TCIFLUSH);
+ 
                if (!username[0])
                        get_username_or_die(username, sizeof(username));
 



=---------------------
 paul fox, [EMAIL PROTECTED]
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to