Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/gen/tcsetattr.3
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" 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 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)tcsetattr.3 8.3 (Berkeley) 1/2/94 | .\" @(#)tcsetattr.3 8.3 (Berkeley) 1/2/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 2, 1994 | .Dd July 15, 2020 | ||||
.Dt TCSETATTR 3 | .Dt TCSETATTR 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm cfgetispeed , | .Nm cfgetispeed , | ||||
.Nm cfsetispeed , | .Nm cfsetispeed , | ||||
.Nm cfgetospeed , | .Nm cfgetospeed , | ||||
.Nm cfsetospeed , | .Nm cfsetospeed , | ||||
.Nm cfsetspeed , | .Nm cfsetspeed , | ||||
▲ Show 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn tcsetattr | .Fn tcsetattr | ||||
function sets the parameters associated with the terminal from the | function sets the parameters associated with the terminal from the | ||||
termios structure referenced by | termios structure referenced by | ||||
.Fa t . | .Fa t . | ||||
The | The | ||||
.Fa action | .Fa action | ||||
argument is created by | argument is one of | ||||
.Em or Ns 'ing | |||||
the following values, as specified in the include file | the following values, as specified in the include file | ||||
.In termios.h . | .In termios.h . | ||||
.Bl -tag -width "TCSADRAIN" | .Bl -tag -width "TCSADRAIN" | ||||
.It Fa TCSANOW | .It Fa TCSANOW | ||||
The change occurs immediately. | The change occurs immediately. | ||||
.It Fa TCSADRAIN | .It Fa TCSADRAIN | ||||
The change occurs after all output written to | The change occurs after all output written to | ||||
.Fa fd | .Fa fd | ||||
has been transmitted to the terminal. | has been transmitted to the terminal. | ||||
This value of | This value of | ||||
.Fa action | .Fa action | ||||
should be used when changing parameters that affect output. | should be used when changing parameters that affect output. | ||||
.It Fa TCSAFLUSH | .It Fa TCSAFLUSH | ||||
The change occurs after all output written to | The change occurs after all output written to | ||||
.Fa fd | .Fa fd | ||||
has been transmitted to the terminal. | has been transmitted to the terminal. | ||||
Additionally, any input that has been received but not read is discarded. | Additionally, any input that has been received but not read is discarded. | ||||
.It Fa TCSASOFT | .El | ||||
If this value is | .Pp | ||||
.Em or Ns 'ed | The | ||||
into the | |||||
.Fa action | .Fa action | ||||
value, the values of the | may be modified by | ||||
.Em or Ns 'ing | |||||
in | |||||
.Fa TCSASOFT | |||||
which causes the values of the | |||||
.Va c_cflag , | .Va c_cflag , | ||||
.Va c_ispeed , | .Va c_ispeed , | ||||
and | and | ||||
.Va c_ospeed | .Va c_ospeed | ||||
fields are ignored. | fields to be ignored. | ||||
.El | |||||
.Pp | .Pp | ||||
The 0 baud rate is used to terminate the connection. | The 0 baud rate is used to terminate the connection. | ||||
If 0 is specified as the output speed to the function | If 0 is specified as the output speed to the function | ||||
.Fn tcsetattr , | .Fn tcsetattr , | ||||
modem control will no longer be asserted on the terminal, disconnecting | modem control will no longer be asserted on the terminal, disconnecting | ||||
the terminal. | the terminal. | ||||
.Pp | .Pp | ||||
If zero is specified as the input speed to the function | If zero is specified as the input speed to the function | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |