[PATCH] Decrease number of threads used by goroutines.go test (take 2)

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Tue Mar 8 18:56:00 GMT 2011


Jakub Jelinek <jakub@redhat.com> writes:

>> Why should this be Linux-specific?  I think the same logic applies
>> everywhere.
>
> Because ulimit -u is Linux specific?  At least, google doesn't show any
> hints about any other OSes having such limit, neither RLIMIT_NPROC nor
> ulimit -u.

At best, it's shell-specific: Solaris 11 /bin/sh (which is ksh93) does
have it, although admittedly previous Solaris/IRIX/Tru64 UNIX shells
don't.  On the other hand, bash has it on all of those systems.

Why not simply test if ulimit -u doesn't error and then use it?  I'd
very much prefer this to a solution that is unnecessarily OS-specific.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list