diff --git a/src/tty.c b/src/tty.c index 52d2541..423ae46 100644 --- a/src/tty.c +++ b/src/tty.c @@ -157,6 +157,10 @@ int connect_tty(void) exit(EXIT_FAILURE); } + /* Flush stale I/O data (if any) */ + tcflush(fd, TCIOFLUSH); + + /* Print connect status */ color_printf("[gotty %s] Connected", current_time()); connected = true; tainted = false;