The problem that _DARWIN_C_SOURCE introduces is that it replaces
system getgroups with a database query effectively making the true
process' list of supplementary group IDs inaccessible to programs.
See source code at
<http://www.opensource.apple.com/source/Libc/Libc-594.1.4/sys/getgroups.c>.
If that is true (i.e. the file is really the one that is being used),
I think this is a severe flaw in OSX's implementation of the POSIX
specification.
Then, I agree that Python, in turn, should make sure that
posix.getgroups is really the POSIX version of getgroups, not the Apple
version. This is a general principle: if the system has two competing
implementations of some API, the Python posix module should strive to
call the POSIX version of the API. If the vendor's version of the API is
also useful, it can be exposed under a different name (if, in turn, this
is technically possible).
Just my 0.02€.
Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com