getconf should support `NPROCESSORS_CONF` and `NPROCESSORS_ONLN`, without a leading underscore, as specified in POSIX: https://austingroupbugs.net/view.php?id=339 This is already supported in macOS, FreeBSD, Solaris and other operating systems.
Created attachment 15492 [details] add NPROCESSORS_CONF and NPROCESSORS_ONLN to getconf
(In reply to Mohamed Akram from comment #1) > Created attachment 15492 [details] > add NPROCESSORS_CONF and NPROCESSORS_ONLN to getconf Could you please send the patch to libc-alpha for revision? The wiki has all the information on how to do [1]. [1] https://sourceware.org/glibc/wiki/Contribution%20checklist
(In reply to Adhemerval Zanella from comment #2) > (In reply to Mohamed Akram from comment #1) > > Created attachment 15492 [details] > > add NPROCESSORS_CONF and NPROCESSORS_ONLN to getconf > > Could you please send the patch to libc-alpha for revision? The wiki has all > the information on how to do [1]. > > [1] https://sourceware.org/glibc/wiki/Contribution%20checklist Thank you, I've sent a patch.
commit 2f7246015c0d0760ab4529c4b13b2816337bed35 Author: Mohamed Akram <mohd.akram@outlook.com> Date: Thu May 30 18:05:50 2024 +0400 getconf: Add NPROCESSORS_{CONF,ONLN} [BZ #31661] These are required by the upcoming POSIX standard and are available on other platforms. Link: https://austingroupbugs.net/view.php?id=339 Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Reviewed-by: Arjun Shankar <arjun@redhat.com>