.TH tcdrain() "" "" "termios Macro (termios.h)"
.PC "Drain output to a device"
.B "#include <termios.h>"
\fBint tcdrain(\fIfd\^\fB)\fR
\fBint \fIfd\^\fB;\fR
.PP
The
.B termios
macro
.B tcdrain()
waits until all output written to device
.I fd
has been transmitted.
.I fd
must have returned by a call to
.BR open() ,
and must describe a terminal device.
.PP
If all goes well,
.B tcdrain()
returns zero.
If something goes wrong, it returns \-1 and sets
.B errno
to an appropriate value, as follows:
.IP \fBEBADF\fR
.I fd
is not a valid file descriptor.
.IP \fBEINTR\fR
A signal interrupted
.BR tcdrain() .
.IP \fBENOTTY\fR
.I fd
does not describe a terminal device.
.SH "See Also"
.Xr "termios" termios
.br
\*(PX Standard, \(sc7.2.2
