public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cquike at arcor dot de" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29147] getconf: Wrong values for symbolic constants defined in limits.h
Date: Mon, 23 May 2022 20:02:28 +0000	[thread overview]
Message-ID: <bug-29147-131-JuuzJdzOhJ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29147-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29147

--- Comment #3 from cquike at arcor dot de ---
Thanks Adhemerval for your comments.

I agree that the documentation of getconf is not very clear on what the tool is
supposed to deliver.

So I see three possible options for this isse:

1. Keep the status quo. The current GNU getconf is not POSIX compliant with the
command of the same name (although to be fair the documentation doesn't claim
it is). The problem I see is that according to the documentation (man getconf)
the value returned by getconf corresponds to a system configuration var as
defined by pathconfig. However, pathconfig in Linux does not define
_POSIX_PIPE_BUF.  It is simply not possible to get the value of _POSIX_PIPE_BUF
using pathconfig. Interestingly, the Linux pathconfig manpage does actually
refer to _POSIX_PIPE_BUF as the minimum value that can be used for a pipe
buffer, clearly distinguishing it from _PC_PIPE_BUF, which is the value that
applications might want to use get "more liberal values". So in that sense, at
least under Linux, the behaviour of GNU version of getconf is inconsistent with
the documentation (man getconf, man pathconfig).

2. Change the behaviour to follow the POSIX standard. As you pointed out this
might be a bit tricky since it could break expectations from existing
applications. However, it could be argued, that applications that request the
value of _POSIX_PIPE_BUF do really care about getting the POSIX behaviour. They
are basically requesting the minimum value of the pipe buffer for _any_ POSIX
compliant implementation. So in that sense that variable is quite related to
POSIX, otherwise there is no much point on asking for it rather than
_PC_PIPE_BUF. In the case this change takes place, the documentation should
clearly state the differences with previous behaviour under the section BUGS.

3. Similar to other GNU utilities, change the behaviour to either 1. or 2.
depending on POSIXLY_CORRECT environmental variable being defined or not.

Let me know your thoughts on that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-05-23 20:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 23:05 [Bug libc/29147] New: " cquike at arcor dot de
2022-05-14 23:05 ` [Bug libc/29147] getconf: " cquike at arcor dot de
2022-05-14 23:12 ` cquike at arcor dot de
2022-05-18 19:47 ` adhemerval.zanella at linaro dot org
2022-05-23 20:02 ` cquike at arcor dot de [this message]
2022-05-23 20:47 ` adhemerval.zanella at linaro dot org
2022-05-24  0:57 ` cquike at arcor dot de
2022-05-24  7:49 ` schwab@linux-m68k.org
2022-05-26 17:22 ` adhemerval.zanella at linaro dot org
2022-05-27 14:31 ` adhemerval.zanella at linaro dot org
2022-07-29 22:10 ` cquike at arcor dot de

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=bug-29147-131-JuuzJdzOhJ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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).