mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
Issue #7272: Add configure test to detect whether sem_open works
properly, and use this to skip test_multiprocessing on platforms where sem_open raises a signal. This should fix some FreeBSD buildbot failures for test_multiprocessing.
This commit is contained in:
parent
ab44226198
commit
c4920e86ef
6 changed files with 127 additions and 5 deletions
|
@ -250,7 +250,8 @@ init_multiprocessing(void)
|
|||
Py_INCREF(&ConnectionType);
|
||||
PyModule_AddObject(module, "Connection", (PyObject*)&ConnectionType);
|
||||
|
||||
#if defined(MS_WINDOWS) || defined(HAVE_SEM_OPEN)
|
||||
#if defined(MS_WINDOWS) || \
|
||||
(defined(HAVE_SEM_OPEN) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES))
|
||||
/* Add SemLock type to module */
|
||||
if (PyType_Ready(&SemLockType) < 0)
|
||||
return;
|
||||
|
@ -297,7 +298,7 @@ init_multiprocessing(void)
|
|||
Py_DECREF(temp); Py_DECREF(value); return; } \
|
||||
Py_DECREF(value)
|
||||
|
||||
#ifdef HAVE_SEM_OPEN
|
||||
#if defined(HAVE_SEM_OPEN) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES)
|
||||
ADD_FLAG(HAVE_SEM_OPEN);
|
||||
#endif
|
||||
#ifdef HAVE_SEM_TIMEDWAIT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue