← Commit list

6e1b62b18

Paul Fox
Paul Fox
2007-11-07
FAILED Duration: 13s

Subject

flush typeahead before prompt

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/login.c+4 -0
@@ -305,6 +305,10 @@ int login_main(int argc, char **argv)
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));