From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Daniel Colascione <dancol@google.com>, Florian Weimer <fw@deneb.enyo.de>
Cc: mtk.manpages@gmail.com, Christian Brauner <christian@brauner.io>,
Jann Horn <jannh@google.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Joel Fernandes <joel@joelfernandes.org>,
Linux API <linux-api@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
linux-man <linux-man@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: For review: pidfd_open(2) manual page
Date: Mon, 23 Sep 2019 22:22:22 +0200 [thread overview]
Message-ID: <39790bc7-f417-1172-0f06-5cdefabda7e1@gmail.com> (raw)
In-Reply-To: <CAKOZuetTgKjgWZpCaBz8q662MwVQ-UhrV4oWFqKEWr35mQTFLw@mail.gmail.com>
Hello Daniel,
Than you for reviewing the page!
On 9/23/19 1:26 PM, Daniel Colascione wrote:
> On Mon, Sep 23, 2019 at 3:53 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>>
>> * Michael Kerrisk:
>>
>>> SYNOPSIS
>>> int pidfd_open(pid_t pid, unsigned int flags);
>>
>> Should this mention <sys/types.h> for pid_t?
>>
>>> ERRORS
>>> EINVAL flags is not 0.
>>>
>>> EINVAL pid is not valid.
>>>
>>> ESRCH The process specified by pid does not exist.
>>
>> Presumably, EMFILE and ENFILE are also possible errors, and so is
>> ENOMEM.
>>
>>> A PID file descriptor can be monitored using poll(2), select(2),
>>> and epoll(7). When the process that it refers to terminates, the
>>> file descriptor indicates as readable.
>
> The phrase "becomes readable" is simpler than "indicates as readable"
> and conveys the same meaning. I agree with Florian's comment on this
> point below.
See my reply to Florian. (I did change the text here.)
>>> Note, however, that in the
>>> current implementation, nothing can be read from the file descrip‐
>>> tor.
>>
>> “is indicated as readable” or “becomes readable”? Will reading block?
>>
>>> The pidfd_open() system call is the preferred way of obtaining a
>>> PID file descriptor. The alternative is to obtain a file descrip‐
>>> tor by opening a /proc/[pid] directory. However, the latter tech‐
>>> nique is possible only if the proc(5) file system is mounted; fur‐
>>> thermore, the file descriptor obtained in this way is not pol‐
>>> lable.
>
> Referring to procfs directory FDs as pidfds will probably confuse
> people. I'd just omit this paragraph.
See my reply to Christian (and feel free to argue the point, please).
So far, I have made no change here.
>> One question is whether the glibc wrapper should fall back back to the
>> /proc subdirectory if it is not available. Probably not.
>
> I'd prefer that glibc not provide this kind of fallback.
> posix_fallocate-style emulation is, IMHO, too surprising.
Agreed.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
next prev parent reply other threads:[~2019-09-23 20:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 9:11 For review: pidfd_open(2) manual page Michael Kerrisk (man-pages)
2019-09-23 10:53 ` Florian Weimer
2019-09-23 11:26 ` Daniel Colascione
2019-09-23 20:22 ` Michael Kerrisk (man-pages) [this message]
2019-09-23 14:47 ` Christian Brauner
2019-09-23 20:22 ` Michael Kerrisk (man-pages)
2019-09-23 20:20 ` Michael Kerrisk (man-pages)
2019-09-23 20:41 ` Florian Weimer
2019-09-23 20:57 ` Michael Kerrisk (man-pages)
2019-09-24 7:38 ` Christian Brauner
2019-09-23 14:38 ` Christian Brauner
2019-09-23 20:21 ` Michael Kerrisk (man-pages)
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=39790bc7-f417-1172-0f06-5cdefabda7e1@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=christian@brauner.io \
--cc=dancol@google.com \
--cc=ebiederm@xmission.com \
--cc=fw@deneb.enyo.de \
--cc=jannh@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=oleg@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox