bpo-41498: Fix build on platforms without sigset_t (GH-29770)

This commit is contained in:
Christian Heimes 2021-11-25 13:28:41 +02:00 committed by GitHub
parent c456dfafe9
commit dc19e86983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 18 deletions

View file

@ -5934,6 +5934,7 @@ parse_posix_spawn_flags(PyObject *module, const char *func_name, PyObject *setpg
}
#ifdef HAVE_SIGSET_T
if (setsigmask) {
sigset_t set;
if (!_Py_Sigset_Converter(setsigmask, &set)) {
@ -5959,6 +5960,13 @@ parse_posix_spawn_flags(PyObject *module, const char *func_name, PyObject *setpg
}
all_flags |= POSIX_SPAWN_SETSIGDEF;
}
#else
if (setsigmask || setsigdef) {
PyErr_SetString(PyExc_NotImplementedError,
"sigset is not supported on this platform");
goto fail;
}
#endif
if (scheduler) {
#ifdef POSIX_SPAWN_SETSCHEDULER