public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Bruno Haible <bruno@clisp.org>,
	linux-man@vger.kernel.org,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] prctl.2: Fix typo
Date: Tue, 31 Oct 2023 17:11:46 +0100	[thread overview]
Message-ID: <ZUEnQmDDLwwfCd_g@debian> (raw)
In-Reply-To: <CACKs7VCi-MZfrhPLGqPDz71ciTBkKGriMwJQAy16WoP--P6=QQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]

Hi Stefan,

On Tue, Oct 31, 2023 at 04:31:58PM +0200, Stefan Puiu wrote:
> Hi Alex and Bruno,
> 
> On Tue, Oct 31, 2023 at 4:06 PM Alejandro Colomar <alx@kernel.org> wrote:
> >
> > Hi Bruno,
> >
> > On Sun, Oct 29, 2023 at 09:51:55PM +0100, Bruno Haible wrote:
> > > The synopsis of the prctl.2 page has:
> > >
> > >        int prctl(int option, ...
> > >
> > > This makes no sense, because
> > >   - the first argument is not optional; it is mandatory.
> > >   - the title of the page is "operations on a process or thread".
> > >
> > > It is thus clear that the first argument indicates the operation to perform.
> > >
> > > Find attached the correction.
> >
> > Agree.  I've seen there are other similarly incorrect uses of the word
> > "option" where "operation" should have been used in the same page (but
> > there are some that are correctly used).  Would you mind checking the
> > entire page for those other replacements?
> 
> Hmm, 'option' is not the same as 'optional'. I guess the first

Yes, I don't think it means optional, but rather a choice from all the
available operations.  However, "operation" would be a more precise
name.

> parameter can be seen as an 'option' passed to prctl() along with some
> other parameters, right?
> 
> Also, there are multiple occurrences of 'option' in the page (e.g.
> 'This option is mainly intended...'), so only changing the argument
> name would introduce an inconsistency in the page. The argument is

Yes, I think we should also update those when they refer to the first
argument, that is, the operation that prctl(2) will perform.

> also called '__option' in glibc headers on my system (in
> /usr/include/x86_64-linux-gnu/sys/prctl.h):
> 
> /* Control process execution.  */
> #ifndef __USE_TIME_BITS64
> extern int prctl (int __option, ...) __THROW;
> #else
> # ifdef __REDIRECT
> extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64);

I've CCed glibc in case they want to rename it too.

> 
> So, I would say I'm not sure this improves things.

I think a consistent use of operation instead of option would improve
things.  We just need to make sure it's consistent.

Cheers,
Alex

> 
> Just my 2 cents,
> Stefan.

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-10-31 16:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 20:51 [PATCH] prctl.2: Fix typo Bruno Haible
2023-10-31 12:40 ` Alejandro Colomar
2023-10-31 14:31   ` Stefan Puiu
2023-10-31 16:11     ` Alejandro Colomar [this message]
2023-10-31 16:19       ` enh
2023-10-31 18:40         ` Alejandro Colomar
2023-10-31 19:15           ` enh
2023-10-31 21:23             ` Alejandro Colomar
2023-11-01  0:37               ` enh
2023-11-01 10:16                 ` Alejandro Colomar
2024-03-03 12:15                   ` [PATCH 0/2] Use terms consistently in function parameter names Alejandro Colomar
2024-03-03 12:15                   ` [PATCH 1/2] man*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation' Alejandro Colomar
2024-03-05 18:12                     ` Alejandro Colomar
2024-03-05 19:19                       ` enh
2024-03-03 12:15                   ` [PATCH 2/2] clock_nanosleep.2, nanosleep.2: Use 'duration' rather than 'request' Alejandro Colomar
2024-03-03 12:45                     ` Bruno Haible
2024-03-03 12:55                       ` Alejandro Colomar
2024-03-03 13:02                         ` [PATCH v2 2/2] " Alejandro Colomar
2024-03-05  0:18                         ` [PATCH 2/2] clock_nanosleep.2, " enh
2024-03-05  0:34                           ` Alejandro Colomar
2024-03-05  0:56                             ` enh
2024-03-05  1:11                               ` Alejandro Colomar
2024-03-05  1:26                                 ` [PATCH v3 3/3] clock_nanosleep.2: Use 't' " Alejandro Colomar
2024-03-05 22:22                                 ` [PATCH 2/2] clock_nanosleep.2, nanosleep.2: Use 'duration' " enh
2023-10-31 17:08       ` [PATCH] prctl.2: Fix typo Bruno Haible
2023-10-31 21:20         ` Alejandro Colomar

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=ZUEnQmDDLwwfCd_g@debian \
    --to=alx@kernel.org \
    --cc=bruno@clisp.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=stefan.puiu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox