Charles-François Natali <neolo...@free.fr> added the comment:

> Testing os.sysconf("SC_SEM_NSEMS_MAX") value is maybe better than
> creating 30 semaphores.

Yeah, I thought about that, but the problem is that it doesn't take into 
account the number of semaphores already allocated: so, for example, if 
sysconf() returns 50 but you already have 30 allocated semaphores, the test 
will fail with ENOFILE.
But if we consider that most buildbots don't have many semaphores allocated 
(and in particular no dangling semaphores), and that FreeBSD 8 has a limit 
substentially higher than 30 (ideally above 256), then I guess we could use 
this.
Patch attached.

----------
Added file: http://bugs.python.org/file23730/test_multi_sem-1.diff

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

Reply via email to