unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: libc-alpha@sourceware.org
Subject: Re: posix_openpt vs getpt??
Date: Tue, 31 Dec 2019 17:53:16 +0100	[thread overview]
Message-ID: <87lfqsl9mr.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20191231164525.ps7mpnh3p4huxlu3@function> (Samuel Thibault's message of "Tue, 31 Dec 2019 17:45:25 +0100")

* Samuel Thibault:

> One thing I'm unsure of: the Linux manpage says 
>
> It is equivalent to
>
>            open("/dev/ptmx", O_RDWR | O_NOCTTY);
>
> But the Linux implementation is
>
> int fd = __posix_openpt (O_RDWR);
>
>
> Is getpt supposed to set the controlling tty or not?  Since the Linux
> behavior has been not to set O_NOCTTY since its introduction in 1998, I
> guess applications assumes !O_NOCTTY and it's the manpage which needs to
> be fixed?

I'm not sure if O_NOCTTY actually has an impact here.  Does /dev/ptmx
actually qualify as a terminal device?

In any case, I agree that the manual page should be fixed.  Would you
submit a patch, please?

      reply	other threads:[~2019-12-31 16:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 21:35 posix_openpt vs getpt?? Samuel Thibault
2019-12-31 13:25 ` Florian Weimer
2019-12-31 16:38   ` Samuel Thibault
2019-12-31 16:45     ` Samuel Thibault
2019-12-31 16:53       ` Florian Weimer [this message]

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=87lfqsl9mr.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@gnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).