Skip to main content

tcflush

Function tcflush 

Source
pub fn tcflush(fd: BorrowedFd<'_>, queue: FlushQueue) -> Result<(), Errno>
Expand description

tcflush (TCFLSH) — purge (jette) les octets non traités de la (des) file(s) désignée(s) par queue.

Le mapping [FlushQueue] → argument entier se fait par un match exhaustif (ADR-021 conv. 3) : [FlushQueue::Input] → TCIFLUSH (0), [FlushQueue::Output] → TCOFLUSH (1), [FlushQueue::Both] → TCIOFLUSH (2).

§Errors

  • [Errno::ENOTTY] : fd n’est pas un terminal.
  • [Errno::EBADF] : fd n’est pas un descripteur valide.