This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21542] New: Use conservative default for sysconf (_SC_NPROCESSORS_ONLN)
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 02 Jun 2017 12:34:08 +0000
- Subject: [Bug libc/21542] New: Use conservative default for sysconf (_SC_NPROCESSORS_ONLN)
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21542
Bug ID: 21542
Summary: Use conservative default for sysconf
(_SC_NPROCESSORS_ONLN)
Product: glibc
Version: 2.25
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Currently, if running in a chroot environment without /proc and /sys, sysconf
(_SC_NPROCESSORS_ONLN) can return 1 on a multi-processor system. This breaks
applications which use the return value to recognize uniprocessor systems and
apply optimizations based on that.
ysconf (_SC_NPROCESSORS_ONLN) should return 2 instead, which is a more
conservative approximation. It can be inefficient, but at least it will not be
completely incorrect.
--
You are receiving this mail because:
You are on the CC list for the bug.