1 2 3 4 5 6 7 8 9 10 11 12
#include <termios.h> #include <sys/ioctl.h> #include "libc.h" int tcdrain(int fd) { int ret; CANCELPT_BEGIN; ret = ioctl(fd, TCSBRK, 1); CANCELPT_END; return ret; }