4.4BSD/usr/share/man/cat3/tcdrain.0

Compare this file to the similar file:
Show the results in this format:

TCSENDBREAK(3)              BSD Programmer's Manual             TCSENDBREAK(3)

NNAAMMEE
     ttccsseennddbbrreeaakk, ttccddrraaiinn, ttccfflluusshh, ttccffllooww - line control functions

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<tteerrmmiiooss..hh>>

     _i_n_t
     ttccddrraaiinn(_i_n_t _f_d);

     _i_n_t
     ttccffllooww(_i_n_t _f_d, _i_n_t _a_c_t_i_o_n);

     _i_n_t
     ttccfflluusshh(_i_n_t _f_d, _i_n_t _a_c_t_i_o_n);

     _i_n_t
     ttccsseennddbbrreeaakk(_i_n_t _f_d, _i_n_t _l_e_n);

DDEESSCCRRIIPPTTIIOONN
     The ttccddrraaiinn function waits until all output written to the terminal ref-
     erenced by _f_d has been transmitted to the terminal.

     The ttccffllooww function suspends transmission of data to or the reception of
     data from the terminal referenced by _f_d depending on the value of _a_c_t_i_o_n.
     The value of _a_c_t_i_o_n must be one of the following:

     _T_C_O_O_F_F  Suspend output.

     _T_C_O_O_N   Restart suspended output.

     _T_C_I_O_F_F  Transmit a STOP character, which is intended to cause the termi-
             nal to stop transmitting data to the system.  (See the descrip-
             tion of IXOFF in the `Input Modes' section of termios(4)).

     _T_C_I_O_N   Transmit a START character, which is intended to cause the termi-
             nal to start transmitting data to the system.  (See the descrip-
             tion of IXOFF in the `Input Modes' section of termios(4)).

     The ttccfflluusshh function discards any data written to the terminal referenced
     by _f_d which has not been transmitted to the terminal, or any data re-
     ceived from the terminal but not yet read, depending on the value of
     _a_c_t_i_o_n. The value of _a_c_t_i_o_n must be one of the following:

     _T_C_I_F_L_U_S_H   Flush data received but not read.

     _T_C_O_F_L_U_S_H   Flush data written but not transmitted.

     _T_C_I_O_F_L_U_S_H  Flush both data received but not read and data written but not
                transmitted.

     The ttccsseennddbbrreeaakk function transmits a continuous stream of zero-valued
     bits for four-tenths of a second to the terminal referenced by _f_d. The
     _l_e_n parameter is ignored in this implementation.

RREETTUURRNN VVAALLUUEESS
     Upon successful completion, all of these functions return a value of ze-
     ro.

EERRRROORRSS
     If any error occurs, a value of -1 is returned and the global variable
     _e_r_r_n_o is set to indicate the error, as follows:


     [EBADF]       The _f_d argument is not a valid file descriptor.

     [EINVAL]      The _a_c_t_i_o_n argument is not a proper value.

     [ENOTTY]      The file associated with _f_d is not a terminal.

     [EINTR]       A signal interrupted the ttccddrraaiinn function.

SSEEEE AALLSSOO
     tcsetattr(3),  termios(4)

SSTTAANNDDAARRDDSS
     The ttccsseennddbbrreeaakk, ttccddrraaiinn, ttccfflluusshh and ttccffllooww functions are expected to be
     compliant with the IEEE Std1003.1-1988 (``POSIX'') specification.

4.4BSD                           June 4, 1993                                2