#include <termios.h>
int tcdrain(FileDescriptor) int FileDescriptor;
The tcdrain subroutine waits until all output written to the object referred to by the FileDescriptor parameter has been transmitted.
FileDescriptor | Specifies an open file descriptor. |
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
The tcdrain subroutine is unsuccessful if one of the following is true:
To wait until all output has been transmitted, enter:
rc = tcdrain(stdout);
This subroutine is part of Base Operating System (BOS) Runtime.
The tcflow subroutine, tcflush subroutine, tcsendbreak subroutine.
The Input and Output Handling Programmer's Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.