1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

Kernel: ioctl(TCSETSF) on a TTY should flush input

This is where we end up when calling tcsetattr() with TCSAFLUSH.
This fixes vttest not accepting the first keystroke as input.
This commit is contained in:
Andreas Kling 2020-05-09 12:30:51 +02:00
parent a0616d96bf
commit 9c927538ad

View file

@ -326,6 +326,8 @@ int TTY::ioctl(FileDescription&, unsigned request, unsigned arg)
if (!process.validate_read(tp, sizeof(termios)))
return -EFAULT;
set_termios(*tp);
if (request == TCSETSF)
flush_input();
return 0;
case TIOCGWINSZ:
ws = reinterpret_cast<winsize*>(arg);