[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc
Re: I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted
Sun, 10 Jan 2010 11:02:57 +0000
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:220.127.116.11) Gecko/20091204 Thunderbird/3.0
On 10/01/10 10:32, Bruno Haible wrote:
Pádraig Brady wrote:
So what about a possible work around?
How about doing this in nproc(1):
if (num_processors(NPROC_ALL) == 1)
It should be NPROC_CURRENT, not NPROC_CURRENT_OVERRIDABLE, I think,
because NPROC_CURRENT_OVERRIDABLE can be overridden by the user quite
I like this workaround, but would prefer to have it in the nproc module
in gnulib. coreutils/src/nproc.c is purely the command-line program.
I was wary about adding a syscall for all users of num_processors(NPROC_ALL),
but on consideration I agree that it's best to add to gnulib.
Here's a proposed patch.