Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

Ronald,

Please see my python-dev post in "red buildbots on 2.7" thread: 

http://mail.python.org/pipermail/python-dev/2010-June/100873.html

I argue that we should apply a fix along the lines of no-darwin-ext.diff while 
waiting for Apple to fix their bugs and support more than 16 groups in 
getgroups properly.

Your latest patch, while prevents getgroups from raising an exception, does not 
change the fact that getgroups return wrong values if group membership changes 
within the process.

Note that I propose to undefine _DARWIN_C_SOURCE for posixmodule.c only.  I 
think that is the right thing to do because defining _DARWIN_C_SOURCE is for 
invoking non-POSIX behavior.  If you still thing there may be other functions 
in posixmodule.c that require _DARWIN_C_SOURCE, we can probably find a way to 
change only getgroups, but I cannot figure out how to do it without adding 
extra source files.

For your reference, here is how getgroups is declared in unistd.h:


#if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE)
int      getgroups(int, gid_t []) __DARWIN_EXTSN(getgroups);
#else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */
int      getgroups(int, gid_t []);
#endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7900>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to