All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: "Joshua M. Clulow" <josh@sysmgr.org>,
	mtk.manpages@gmail.com, Larry Dwyer <larryd.kbd@gmail.com>,
	Florian Weimer <fweimer@redhat.com>,
	linux-man <linux-man@vger.kernel.org>,
	Andrew Josey <ajosey@opengroup.org>,
	libc-alpha <libc-alpha@sourceware.org>,
	Elliot Hughes <enh@google.com>,
	Joseph Myers <joseph@codesourcery.com>,
	austin-group-l@opengroup.org
Subject: Re: Pseudoterminal terminology in POSIX
Date: Tue, 18 Aug 2020 17:10:54 +0100	[thread overview]
Message-ID: <20200818161053.GC6642@arm.com> (raw)
In-Reply-To: <20200812131900.JbiVo%steffen@sdaoden.eu>

On Wed, Aug 12, 2020 at 03:19:00PM +0200, Steffen Nurpmeso wrote:
> Joshua M. Clulow via austin-group-l at The Open Group wrote in
>  <CAEwA5nKtyJTnQEXZZaiHywTpfDCprmupnCiq9kf5oupV7iG8RA@mail.gmail.com>:
>  |On Tue, 11 Aug 2020 at 01:33, Michael Kerrisk man-pages via
>  |austin-group-l at The Open Group <austin-group-l@opengroup.org> wrote:
>  |> On 8/9/20 1:18 AM, Larry Dwyer via Libc-alpha wrote:
>  |>> How about the "control" side and the "terminal" side (of the paired
>  |>> device files)?
>  |>
>  |> Thanks for the suggestion. As far as I'm concerned, that would
>  |> also be an option worth considering.
>  |
>  |I work on the illumos project and a few of us have been having a
>  |(not yet public) discussion about this lately as well.  I think the
>  |best one we could think of was:
>  |
>  |    the "control" side for the result of posix_openpt()
>  |
>  |    the "subordinate" side for the result of ptsname() and open(),
> 
> You know, (In)Subordination has a very military touch, with
> exclamation mark many may have heard it.  Also in traditional
> (white western world) education as such.  Like in first the
> pizzle, then the bull pizzle, maybe.  So to say.  In my ears this
> sounds more aggressive and weird than slave, in a technical
> combination of master/slave, ever could.
> Also isn't it a bit submissive here; it is under control, but
> other than that.
> 
>  |    "/dev/pts" still makes sense, etc
>  |
>  |    we would rename our "/dev/ptmx" device file the "manager
>  |    driver" rather than the "master"
>  |
>  |We would strongly consider using the same shift as other projects,
>  |but I think only if they actually make sense; e.g., the "terminal"
>  |and "pseudoterminal" end doesn't really stand out as completely
>  |clear.
> 
> Manager sounds strange here, i always liked manager/worker
> terminologie for threads, and used them like that (and am the
> opinion that .. but that is something different and has sailed),
> but for a pseudo terminal?  I think that if the standard wants to
> be future proof manager should be avoided.  These guys induce
> strange, ruthless and devastating decisions which destroy life on
> earth (as we used to know it), so i for one do not want to be
> harassed by such a term.

Was this discussion concluded yet?

Question: was there ever an intention that a pty master-slave pair
should resemble two real terminals connected to each other?  (e.g., two
serial ports on the same machine, cabled together).


POSIX seems pretty vague as to whether the pty master counts as a
terminal or not.  In Linux, it has many but not all of the properties
of a terminal.  It's not at all clear whether this is intentional, and
I don't know whether other implementations behave similarly.

The main distinctions I'm aware of are that the pty master cannot become
the controlling terminal of any process, and that both master and slave
have rather weird dialin/hangup semantics which appear rather ad-hoc and
don't map nicely onto the behaviour of physical terminal lines.

The master also has a few extra ioctls at its disposal for managing the
pair.

Other stuff does work identically on the pty master and slave though,
such as setting termios modes.  I have a vague memory of successfully
setting ECHO on both ends...


IMHO, the real problem here is that pty devices are underspecified,
and counterintuitive in some areas.  Changing the nomenclature won't fix
that.

Plus, renaming things won't kill off the old terminology, and with both
naming schemes in circulation, people are likely to be even more
confused than they were to start with, no?

Cheers
---Dave

  reply	other threads:[~2020-08-18 16:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 11:21 Pseudoterminal terminology in POSIX Michael Kerrisk
2020-08-05 13:51 ` Steffen Nurpmeso
     [not found]   ` <20200805142049.GA17848@localhost>
2020-08-05 20:34     ` Michael Kerrisk (man-pages)
     [not found]     ` <CAP1RCkjrqKGJmh6f637D=yGuhev7ae5QJkMjv5a8iHo4X33NFw@mail.gmail.com>
     [not found]       ` <1d8c5e6e96fbdd47ce143a566b57db2c803d4898.camel@gnu.org>
2020-08-05 20:34         ` Michael Kerrisk (man-pages)
     [not found]         ` <21048.1596645536@jinx.noi.kre.to>
     [not found]           ` <CAH7i3LrNvBo3indixGyJgS2_4F9r3cd3kOiDgPK8m-ZXj1a0zg@mail.gmail.com>
     [not found]             ` <874bfe40-5f05-151d-42b3-482baacbf0b2@gmail.com>
     [not found]               ` <CAH7i3LpXZxwaLQTY=XK8zM4jWYHSiy1feA6ZLE-mT-ZiJNak5A@mail.gmail.com>
2020-08-11  8:31                 ` Michael Kerrisk (man-pages)
2020-08-08 23:18 ` Larry Dwyer
2020-08-10 13:20   ` Joerg Schilling
2020-08-10 18:10     ` Zack Weinberg
2020-08-10 18:17       ` Samuel Thibault
2020-08-10 18:21         ` Samuel Thibault
2020-08-11  8:32       ` Michael Kerrisk (man-pages)
2020-08-10 13:58   ` Thor Lancelot Simon
2020-08-11  8:31     ` Michael Kerrisk (man-pages)
2020-08-11 11:51       ` Thor Lancelot Simon
2020-08-11 14:20         ` Michael Kerrisk
2020-08-12 14:37       ` Thor Lancelot Simon
2020-08-11  8:32   ` Michael Kerrisk (man-pages)
2020-08-11 17:29     ` Joshua M. Clulow
2020-08-12 13:19       ` Steffen Nurpmeso
2020-08-18 16:10         ` Dave Martin [this message]
2020-08-11 11:17   ` Dirk Fieldhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818161053.GC6642@arm.com \
    --to=dave.martin@arm.com \
    --cc=ajosey@opengroup.org \
    --cc=austin-group-l@opengroup.org \
    --cc=enh@google.com \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=josh@sysmgr.org \
    --cc=larryd.kbd@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.