[Python-Dev] red buildbots on 2.7

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jun 22 19:05:38 CEST 2010


On Tue, Jun 22, 2010 at 12:39 PM, Ronald Oussoren
<ronaldoussoren at mac.com> wrote:
..
> Both are valid fixes, both have both advantages and disadvantages.
>
> Your proposal:
> * Reverts to the behavior in 2.6
> * Ensures that posix.getgroups and posix.setgroups are internally consistent
>
It is also very simple and since posix module worked fine on OSX for
years without _DARWIN_C_SOURCE, I think this is a very low risk
change.

> My proposal:
> * Uses the newer ABI, which is more likely to be the one Apple wants you to use

I don't think so.  In getgroups(2) I see

LEGACY DESCRIPTION
     If _DARWIN_C_SOURCE is defined, getgroups() can return more than
{NGROUPS_MAX} groups.

This suggests that this is legacy behavior.  Newer applications should
use getgrouplist instead.

> * Is compatible with system tools (that is, posix.getgroups() agrees with id(1))

I have not tested this recently, but I think if you exec id from a
program after a call to setgroups(), it will return process groups,
not user groups.

> * Is compatible with /usr/bin/python

I am sure that one this issue is fixed upstream, Apple will pick it up
with the next version.

> * results in posix.getgroups not reflecting results of posix.setgroups
>

This effectively substitutes getgrouplist called on the current user
for getgroups.  In 3.x, I believe the correct action will be to
provide direct access to getgrouplist which is while not POSIX (yet?),
is widely available.


More information about the Python-Dev mailing list