pty.7: Clarify asynchronous nature of PTY I/O

A PTY is not like a pipe - there may be delayed between data
being written at one end and it being available at the other.

This became particularly apparent after
     commit f95499c3030f
    ("n_tty: Don't wait for buffer work in read() loop")
in Linux 3.12

See also the mail thread at https://lkml.org/lkml/2015/5/1/35
	Date	Mon, 04 May 2015 12:32:04 -0400
	From	Peter Hurley <>
	Subject	Re: [PATCH bisected regression] input_available_p()
                sometimes says 'no' when it should say 'yes'

Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
NeilBrown 2015-05-06 08:59:07 +10:00 committed by Michael Kerrisk
parent ec9a2be0f9
commit 4b06376957
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ terminal emulators,
and
.BR expect (1).
Data flow between master and slave is handle asynchronously, much like
data flow with a physical TTY. Data written to the slave will be
available at the master promptly, but may not be available
immediately. Similarly there may be a small processing delay between
a write to the master, and the effect being visible at the slave.
Historically, two pseudoterminal APIs have evolved: BSD and System V.
SUSv1 standardized a pseudoterminal API based on the System V API,
and this API should be employed in all new programs that use