mirror of https://github.com/mkerrisk/man-pages
termios.3: Add missing details on behaviour of PARMRK
For a serial terminal, with a specific configuration, input bytes with value 0377 are passed to the program as two bytes, 0377 0377. This (correct) behaviour is described in the documentation of the GNU C Library (https://www.gnu.org/software/libc/manual/html_node/Input-Modes.html#Input-Modes) but not in the termios.3 man page. Problematic configuration: INPCK set, IGNPAR not set, PARMRK set, ISTRIP not set. This man page problem affects several users. Examples: * http://sourceforge.net/p/ftdi-usb-sio/mailman/message/4079724/ * http://mailman.uclinux.org/pipermail/uclinux-dev/2006-November/040984.html * ... Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
cc3407d12d
commit
2d7c8f1f78
|
@ -36,6 +36,8 @@
|
||||||
.\" Added a section on canonical and noncanonical mode.
|
.\" Added a section on canonical and noncanonical mode.
|
||||||
.\" Enhanced the discussion of "raw" mode for cfmakeraw().
|
.\" Enhanced the discussion of "raw" mode for cfmakeraw().
|
||||||
.\" Document CMSPAR.
|
.\" Document CMSPAR.
|
||||||
|
.\" 2015-11-04, Olivier TARTROU <olivier.tartrou@gmail.com>:
|
||||||
|
.\" Reworked description of PARMRK from https://www.gnu.org/software/libc/manual/html_node/Input-Modes.html#Input-Modes
|
||||||
.\"
|
.\"
|
||||||
.TH TERMIOS 3 2015-03-02 "Linux" "Linux Programmer's Manual"
|
.TH TERMIOS 3 2015-03-02 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
|
@ -133,8 +135,17 @@ in which case it reads as the sequence \\377 \\0 \\0.
|
||||||
Ignore framing errors and parity errors.
|
Ignore framing errors and parity errors.
|
||||||
.TP
|
.TP
|
||||||
.B PARMRK
|
.B PARMRK
|
||||||
If \fBIGNPAR\fP is not set, prefix a character with a parity error or
|
If this bit is set, input bytes with parity or framing errors are
|
||||||
framing error with \\377 \\0.
|
marked when passed to the program. This bit is meaningful only when
|
||||||
|
\fBINPCK\fP is set and \fBIGNPAR\fP is not set.
|
||||||
|
The way erroneous bytes are marked is with two preceding bytes,
|
||||||
|
\\377 and \\0. Thus, the program actually reads three bytes for one
|
||||||
|
erroneous byte received from the terminal.
|
||||||
|
If a valid byte has the value \\377, and \fBISTRIP\fP (see below) is
|
||||||
|
not set, the program might confuse it with the prefix that marks a
|
||||||
|
parity error. So a valid byte \\377 is passed to the program as two
|
||||||
|
bytes, \\377 \\377, in this case.
|
||||||
|
|
||||||
If neither \fBIGNPAR\fP nor \fBPARMRK\fP
|
If neither \fBIGNPAR\fP nor \fBPARMRK\fP
|
||||||
is set, read a character with a parity error or framing error
|
is set, read a character with a parity error or framing error
|
||||||
as \\0.
|
as \\0.
|
||||||
|
|
Loading…
Reference in New Issue