ruby-changes:18998
From: kosaki <ko1@a...>
Date: Sun, 6 Mar 2011 23:21:39 +0900 (JST)
Subject: [ruby-changes:18998] Ruby:r31034 (trunk): * process.c (maxgroups, proc_setmaxgroups): increase max groups
kosaki 2011-03-06 23:21:31 +0900 (Sun, 06 Mar 2011) New Revision: 31034 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31034 Log: * process.c (maxgroups, proc_setmaxgroups): increase max groups limitation up to 65536. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31033) +++ ChangeLog (revision 31034) @@ -1,3 +1,8 @@ +Sun Mar 6 23:18:23 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * process.c (maxgroups, proc_setmaxgroups): increase max groups + limitation up to 65536. + Sun Mar 6 22:20:59 2011 Tanaka Akira <akr@f...> * ext/openssl/ossl_pkey_ec.c: parenthesize macro arguments. Index: process.c =================================================================== --- process.c (revision 31033) +++ process.c (revision 31034) @@ -4531,7 +4531,28 @@ #endif -static int maxgroups = 32; +/* + * Maximum supplementary groups are platform dependent. + * FWIW, 65536 is enough big for our supported OSs. + * + * OS Name max groups + * ----------------------------------------------- + * Linux Kernel >= 2.6.3 65536 + * Linux Kernel < 2.6.3 32 + * IBM AIX 5.2 64 + * IBM AIX 5.3 ... 6.1 128 + * IBM AIX 7.1 128 (can be configured to be up to 2048) + * OpenBSD, NetBSD 16 + * FreeBSD < 8.0 16 + * FreeBSD >=8.0 1023 + * Darwin (Mac OS X) 16 + * Sun Solaris 7,8,9,10 16 + * Sun Solaris 11 / OpenSolaris 1024 + * HP-UX 20 + * Windows 1015 + */ +#define RB_MAX_GROUPS (65536) +static int maxgroups = RB_MAX_GROUPS; #ifdef HAVE_GETGROUPS @@ -4694,8 +4715,8 @@ { int ngroups = FIX2UINT(val); - if (ngroups > 4096) - ngroups = 4096; + if (ngroups > RB_MAX_GROUPS) + ngroups = RB_MAX_GROUPS; maxgroups = ngroups; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/