Pseudoterminal terminology (was Re: Rename "master" branch to "main"?)

enh enh@google.com
Tue Jul 28 18:47:43 GMT 2020


On Tue, Jul 28, 2020 at 8:26 AM Michael Kerrisk (man-pages) <
mtk.manpages@gmail.com> wrote:

> On 7/27/20 10:52 PM, enh wrote:
>
> [...]
>
> > yeah, i'm can't say i'm particularly excited about those terms ... but
> > "master" and "slave" weren't super obvious either.
> >
> > tbh, i don't think any of the choices in this thread are actually _worse_
> > in terms of clarity (though existing practice was at least consistent so
> > you could rtfm).
> >
> > i found the python reference i failed to find for michael earlier... it
> > looks like i couldn't find it because it's the one master/slave change to
> > python that they didn't actually submit. in
> > https://github.com/python/cpython/pull/9100 they were going to go with
> > parent and child but gvanrossum said they shouldn't change unless Unix
> > changes.
> >
> > at least parent/child are names that most folks (including non-native
> > speakers) will have had to learn already.
>
> Those names (parent, child) do seem strange to me. With process
> creation, those terms make a kind of sense. There's no obvious sense
> to me for parent/child in the pty context. (The nearest I can see: The
> parent device tells the child device what to do? Now that's a whole
> other interesting can of worms.)
>

parent/child might be a good choice for the related forkpty(). (given
bionic's "you'll probably be looking at this in Android Studio or Visual
Studio Code's argument name completion UI, so let's use a longer name to
save you a trip to the man page if you know roughly what you're doing but
can't remember what order the arguments are in" style, that would probably
still be `int forkpty(int* _Nonnull __parent_pty_fd, char* _Nullable
__child_tty_name, ...`.)

(note also that the man page for forkpty() seems to be the only place the
return type is given as pid_t rather than int --- afaict all the libcs
actually use int?)


> > golang went with pty/tty (
> >
> https://github.com/creack/pty/commit/7dc38fb350b1d71383eed149e73acb7bae231ddb
> )
> > which is interestingly simple.
>
> The simplicity of it is appealing. But, how does this read in
> prose documentation. Do we replace actual English words with
> abbreviations ("pty", "tty")? That looks a little weird in writing,
> and seems weirder when spoken aloud. And then: "the pseudoterminal
> pty device" seems a little bit like something I might find in
> "The Department of Redundancy Dept"...
>
> I think proper English nouns would be preferable, if we can find
> ones that are suitable.
>
> Cheers,
>
> Michael
>
>
> --
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/
>


More information about the Libc-alpha mailing list