[Bug libc/21542] New: Use conservative default for sysconf (_SC_NPROCESSORS_ONLN)
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Jun 2 12:34:00 GMT 2017
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.
More information about the Glibc-bugs
mailing list