Solaris /usr/bin/**/getconf have a couple of bugs, that's just an old
one you're hitting.

nproc is in the coreutils package because getconf is part of glibc and
not of coreutils and the coreutils authors have already stated their
disapproval for the getconf interface. I'd expect that each time
getconf has a useful application for coreutils users the coreutils
team just adds an own interface utility for it.

Olga

2010/5/13 Darren J Moffat <darren.mof...@oracle.com>:
> On 13/05/2010 17:18, ольга крыжановская wrote:
>>
>> AFAIK scripts should use getconf tags NPROCESSORS_CONF,
>> NPROCESSORS_MAX or NPROCESSORS_ONLN (or just NPROCESSORS_ONLN because
>> it describes the number of currently online cores) to determinate the
>> number of processors it can use. This works on almost all platforms
>> (Linux, FreeBSD, OpenBSD) and within ksh93's getconf.
>
> It doesn't work with the /usr/bin/getconf on current OpenSolaris builds, but
> you are correct it does with with the ks93 built in getconf
>
> However this case isn't about what "scripts" should or should not do and any
> mention of POSIX or POSIX features isn't releveant.  It is about delivering
> the GNU coreutils as they are.  Several people in the GNU community
> obviously thought the nproc tool was useful otherwise it wouldn't be in the
> coreutils package.
>
> The reason I asked about the implementation was to make sure that the tool
> was using sysconf(3M) or something else "sensible" rather that doing
> something platform specific - I asked because I saw mention of Linux /proc
> and /sys in the GNU coreutils changelog in the context of the nproc program.
>
> --
> Darren J Moffat
>



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     olga.kryzhanov...@gmail.com   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`
_______________________________________________
opensolaris-arc mailing list
opensolaris-arc@opensolaris.org

Reply via email to