tcdrain - Man Page

block until output is transmitted

Library

Standard C library (libc, -lc)

Synopsis

#include <termios.h>

int tcdrain(int fd);

Description

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

Return Value

0

on success.

-1

on failure and set errno to indicate the error.

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
tcdrain()Thread safetyMT-Safe

Standards

POSIX.1-2008.

History

POSIX.1-2001.

See Also

tcsendbreak(3), tcflush(3), tcflow(3), termios(7)

Info

2026-07-02 Linux man-pages 6.20