flush stdin after nsjail ends

This commit is contained in:
Robert Swiecki 2019-03-10 15:00:45 +01:00
parent f80318fe2c
commit 46f463a62c

View File

@ -188,7 +188,10 @@ void setTC(int fd, const struct termios* trm) {
PLOG_W("ioctl(fd=%d, TCSETS) failed", fd);
return;
}
LOG_D("Restored the previous state of the TTY");
if (tcflush(fd, TCIFLUSH) == -1) {
PLOG_W("tcflush(fd=%d, TCIFLUSH) failed", fd);
return;
}
}
} // namespace nsjail