summaryrefslogtreecommitdiffstats
path: root/Modules/_winapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r--Modules/_winapi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 1b28adb..e1672c4 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -1080,6 +1080,14 @@ _winapi_CreateProcess_impl(PyObject *module,
return NULL;
}
+ PyInterpreterState *interp = PyInterpreterState_Get();
+ const PyConfig *config = _PyInterpreterState_GetConfig(interp);
+ if (config->_isolated_interpreter) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "subprocess not supported for isolated subinterpreters");
+ return NULL;
+ }
+
ZeroMemory(&si, sizeof(si));
si.StartupInfo.cb = sizeof(si);