?? tcsendbreak.3
字號:
.\" Copyright (c) 1991, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)tcsendbreak.3 8.1 (Berkeley) 6/4/93.\".Dd "June 4, 1993".Dt TCSENDBREAK 3.Os.Sh NAME.Nm tcsendbreak ,.Nm tcdrain ,.Nm tcflush ,.Nm tcflow.Nd line control functions.Sh SYNOPSIS.Fd #include <termios.h>.Ft int.Fn tcdrain "int fd".Ft int.Fn tcflow "int fd" "int action".Ft int.Fn tcflush "int fd" "int action".Ft int.Fn tcsendbreak "int fd" "int len".Sh DESCRIPTIONThe.Nm tcdrainfunction waits until all output written to the terminal referenced by.Fa fdhas been transmitted to the terminal..PpThe.Nm tcflowfunction suspends transmission of data to or the reception of data fromthe terminal referenced by.Fa fddepending on the value of.Fa action .The value of.Fa actionmust be one of the following:.Bl -tag -width "TCIOFF".It Fa TCOOFFSuspend output..It Fa TCOONRestart suspended output..It Fa TCIOFFTransmit a STOP character, which is intended to cause the terminal to stoptransmitting data to the system.(See the description of IXOFF in the.Ql Input Modessection of.Xr termios 4 )..It Fa TCIONTransmit a START character, which is intended to cause the terminal to starttransmitting data to the system.(See the description of IXOFF in the.Ql Input Modessection of.Xr termios 4 )..El.PpThe.Nm tcflushfunction discards any data written to the terminal referenced by.Fa fdwhich has not been transmitted to the terminal, or any data receivedfrom the terminal but not yet read, depending on the value of.Fa action .The value of.Fa actionmust be one of the following:.Bl -tag -width "TCIOFLUSH".It Fa TCIFLUSHFlush data received but not read..It Fa TCOFLUSHFlush data written but not transmitted..It Fa TCIOFLUSHFlush both data received but not read and data written but not transmitted..El.PpThe.Nm tcsendbreakfunction transmits a continuous stream of zero-valued bits for four-tenthsof a second to the terminal referenced by.Fa fd .The.Fa lenparameter is ignored in this implementation..Sh RETURN VALUESUpon successful completion, all of these functions return a value of zero..Sh ERRORSIf any error occurs, a value of -1 is returned and the global variable.Va errnois set to indicate the error, as follows:.Bl -tag -width Er.It Bq Er EBADFThe.Fa fdargument is not a valid file descriptor..It Bq Er EINVALThe.Fa actionargument is not a proper value..It Bq Er ENOTTYThe file associated with.Fa fdis not a terminal..It Bq Er EINTRA signal interrupted the.Nm tcdrainfunction..El.Sh SEE ALSO.Xr tcsetattr 3 ,.Xr termios 4.Sh STANDARDSThe.Nm tcsendbreak ,.Nm tcdrain ,.Nm tcflushand.Nm tcflowfunctions are expected to be compliant with the.St -p1003.1-88specification.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -