tcdrain(3) CLIX tcdrain(3)
NAME
tcdrain - Waits for output to complete
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <termios.h>
int tcdrain(
int filedescriptor );
PARAMETERS
filedescriptor Specifies an open file descriptor.
DESCRIPTION
The tcdrain() function waits until all output written to the object
referred to by the filedescriptor parameter has been transmitted.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and the global variable errno is set to indicate the
error.
ERRORS
The tcdrain() function fails if one or more of the following are true:
[EBADF] The filedescriptor parameter does not specify a valid file
descriptor.
[EINTR] A signal interrupted the tcdrain() function.
[ENOTTY] The file associated with the filedescriptor parameter is not a
terminal.
EXAMPLES
To wait until all output has been transmitted, enter the following:
rc = tcdrain(stdout);
RELATED INFORMATION
2/94 - Intergraph Corporation 1
tcdrain(3) CLIX tcdrain(3)
Functions: tcflow(3), tcflush(3), tcsendbreak(3)
Files: termios(7)
2 Intergraph Corporation - 2/94