1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)tcsendbreak.3 8.1 (Berkeley) 06/04/93 7.\" 8.Dd "" 9.Dt TCSENDBREAK 3 10.Os 11.Sh NAME 12.Nm tcsendbreak , 13.Nm tcdrain , 14.Nm tcflush , 15.Nm tcflow 16.Nd line control functions 17.Sh SYNOPSIS 18.Fd #include <termios.h> 19.Ft int 20.Fn tcdrain "int fd" 21.Ft int 22.Fn tcflow "int fd" "int action" 23.Ft int 24.Fn tcflush "int fd" "int action" 25.Ft int 26.Fn tcsendbreak "int fd" "int len" 27.Sh DESCRIPTION 28The 29.Nm tcdrain 30function waits until all output written to the terminal referenced by 31.Fa fd 32has been transmitted to the terminal. 33.Pp 34The 35.Nm tcflow 36function suspends transmission of data to or the reception of data from 37the terminal referenced by 38.Fa fd 39depending on the value of 40.Fa action . 41The value of 42.Fa action 43must be one of the following: 44.Bl -tag -width "TCIOFF" 45.It Fa TCOOFF 46Suspend output. 47.It Fa TCOON 48Restart suspended output. 49.It Fa TCIOFF 50Transmit a STOP character, which is intended to cause the terminal to stop 51transmitting data to the system. 52(See the description of IXOFF in the 53.Ql Input Modes 54section of 55.Xr termios 4 ). 56.It Fa TCION 57Transmit a START character, which is intended to cause the terminal to start 58transmitting data to the system. 59(See the description of IXOFF in the 60.Ql Input Modes 61section of 62.Xr termios 4 ). 63.El 64.Pp 65The 66.Nm tcflush 67function discards any data written to the terminal referenced by 68.Fa fd 69which has not been transmitted to the terminal, or any data received 70from the terminal but not yet read, depending on the value of 71.Fa action . 72The value of 73.Fa action 74must be one of the following: 75.Bl -tag -width "TCIOFLUSH" 76.It Fa TCIFLUSH 77Flush data received but not read. 78.It Fa TCOFLUSH 79Flush data written but not transmitted. 80.It Fa TCIOFLUSH 81Flush both data received but not read and data written but not transmitted. 82.El 83.Pp 84The 85.Nm tcsendbreak 86function transmits a continuous stream of zero-valued bits for four-tenths 87of a second to the terminal referenced by 88.Fa fd . 89The 90.Fa len 91parameter is ignored in this implementation. 92.Sh RETURN VALUES 93Upon successful completion, all of these functions return a value of zero. 94.Sh ERRORS 95If any error occurs, a value of -1 is returned and the global variable 96.Va errno 97is set to indicate the error, as follows: 98.Bl -tag -width Er 99.It Bq Er EBADF 100The 101.Fa fd 102argument is not a valid file descriptor. 103.It Bq Er EINVAL 104The 105.Fa action 106argument is not a proper value. 107.It Bq Er ENOTTY 108The file associated with 109.Fa fd 110is not a terminal. 111.It Bq Er EINTR 112A signal interrupted the 113.Nm tcdrain 114function. 115.El 116.Sh SEE ALSO 117.Xr tcsetattr 3 , 118.Xr termios 4 119.Sh STANDARDS 120The 121.Nm tcsendbreak , 122.Nm tcdrain , 123.Nm tcflush 124and 125.Nm tcflow 126functions are expected to be compliant with the 127.St -p1003.1-88 128specification. 129