From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A468F3858427; Mon, 23 May 2022 20:02:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A468F3858427 From: "cquike at arcor dot de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cquike at arcor dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 20:02:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29147 --- 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 too= l 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 cla= im it is). The problem I see is that according to the documentation (man getco= nf) 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 th= is might be a bit tricky since it could break expectations from existing applications. However, it could be argued, that applications that request t= he 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_ POS= IX 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 BUG= S. 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=