1 2 3 4 5 6 7 8 9
#include <termios.h> #include <sys/ioctl.h> #include "libc.h" #include "syscall.h" int tcdrain(int fd) { return syscall_cp(SYS_ioctl, fd, TCSBRK, 1); }