tcflush

tcflush is a Linux standard interface to discard data written to the object .

See Library Functions on the Linux man-pages project for more information.