Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751743AbbEFM0P (ORCPT ); Wed, 6 May 2015 08:26:15 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:36457 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbbEFM0M (ORCPT ); Wed, 6 May 2015 08:26:12 -0400 Message-ID: <554A0861.8030806@gmail.com> Date: Wed, 06 May 2015 14:26:09 +0200 From: "Michael Kerrisk (man-pages)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: NeilBrown , Nic Percival CC: mtk.manpages@gmail.com, Michael Matz , Peter Hurley , Greg Kroah-Hartman , Jiri Slaby , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH man-pages] pty.7: clarify asynchronous nature of PTY IO. References: <20150501162040.05c0cb42@notabene.brown> <5543964C.9030606@hurleysoftware.com> <20150506085907.62df914f@notabene.brown> In-Reply-To: <20150506085907.62df914f@notabene.brown> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2021 Lines: 62 Hi Neil, On 05/06/2015 12:59 AM, NeilBrown wrote: > > 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 > > --- Thanks! Applied and tweaked a very little. > Peter: does this seem reasonable and accurate to you? I've got the patch sitting in a branch, in case Peter has suggestions for changes. > 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 No, it's fine as is, thanks. Cheers, Michael > 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 > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/