1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

sysconf: Use conservative default for _SC_NPROCESSORS_ONLN [BZ #21542]

This commit is contained in:
Florian Weimer
2017-07-04 16:12:46 +02:00
parent 4446a885f3
commit 1ff6c67a25
4 changed files with 109 additions and 2 deletions

View File

@ -188,7 +188,10 @@ __get_nprocs (void)
cp = buffer_end;
re = buffer_end;
result = 1;
/* Default to an SMP system in case we cannot obtain an accurate
number. */
result = 2;
/* The /proc/stat format is more uniform, use it by default. */
fd = open_not_cancel_2 ("/proc/stat", flags);