Index: Modules/posixmodule.c =================================================================== --- Modules/posixmodule.c (révision 80063) +++ Modules/posixmodule.c (copie de travail) @@ -2688,18 +2688,22 @@ wchar_t *command; if (!PyArg_ParseTuple(args, "u:system", &command)) return NULL; + + Py_BEGIN_ALLOW_THREADS + sts = _wsystem(command); + Py_END_ALLOW_THREADS #else + PyObject *command_obj; char *command; - if (!PyArg_ParseTuple(args, "s:system", &command)) + if (!PyArg_ParseTuple(args, "O&:system", PyUnicode_FSConverter, &command_obj)) return NULL; -#endif + + command = bytes2str(command_obj, 1); Py_BEGIN_ALLOW_THREADS -#ifdef MS_WINDOWS - sts = _wsystem(command); -#else sts = system(command); + Py_END_ALLOW_THREADS + release_bytes(command_obj); #endif - Py_END_ALLOW_THREADS return PyLong_FromLong(sts); } #endif