This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients neologix, pitrou, vstinner
Date 2011-11-19.17:14:58
SpamBayes Score 2.141563e-07
Marked as misclassified No
Message-id <1321722899.91.0.706768491287.issue12156@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2011-11-19 17:15:00neologixsetrecipients: + neologix, pitrou, vstinner
2011-11-19 17:14:59neologixsetmessageid: <1321722899.91.0.706768491287.issue12156@psf.upfronthosting.co.za>
2011-11-19 17:14:59neologixlinkissue12156 messages
2011-11-19 17:14:59neologixcreate