[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 6 May 2015 08:59:07 +1000
From: NeilBrown <neilb@...e.de>
To: Nic Percival <Nic.Percival@...rofocus.com>,
Michael Kerrisk <mtk.manpages@...il.com>
Cc: Michael Matz <matz@...e.de>,
Peter Hurley <peter@...leysoftware.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH man-pages] pty.7: clarify asynchronous nature of PTY IO.
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
Signed-off-by: NeilBrown <neilb@...e.de>
---
Peter: does this seem reasonable and accurate to you?
MichaelK: Would you prefer the commit ID in the man page. It isn't so much
a deliberate change as a code improvement which caused problems for certain
use cases which depended on undefined behaviour.
Thread at https://lkml.org/lkml/2015/5/1/35
NeilBrown
diff --git a/man7/pty.7 b/man7/pty.7
index 1332d11d9ca2..6c9ae182925c 100644
--- a/man7/pty.7
+++ b/man7/pty.7
@@ -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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists