Hi, The recently introduced nproc utility outputs wrong result when run in --all mode inside a /proc-less /sys-less GNU/Linux chroot on a system with several CPUs. In this environment, "nproc --all" always outputs 1 while plain "nproc" outputs correct number of available CPUs. The underlying num_processors() function from gnulib relies on sysconf (_SC_NPROCESSORS_CONF) which always return 1 when neither /sys nor /proc is mounted.
I'm not sure whether this limitation is unavoidable (and have to be documented) or it should be treated as a bug. In the first case, tests/misc/nproc-avail also needs to be adjusted to call skip_test_ when the OS is GNU/Linux and neither /sys nor /proc is mounted. -- ldv
pgpMHNksjgzTo.pgp
Description: PGP signature