Index: Modules/_multiprocessing/connection.h =================================================================== --- Modules/_multiprocessing/connection.h (révision 64812) +++ Modules/_multiprocessing/connection.h (copie de travail) @@ -39,6 +39,7 @@ ConnectionObject *self; HANDLE handle; BOOL readable = TRUE, writable = TRUE; + struct stat *statbuf; static char *kwlist[] = {"handle", "readable", "writable", NULL}; @@ -46,7 +47,8 @@ &handle, &readable, &writable)) return NULL; - if (handle == INVALID_HANDLE_VALUE || (Py_ssize_t)handle < 0) { + if (handle == INVALID_HANDLE_VALUE || (Py_ssize_t)handle < 0 + || fstat(handle, &statbuf)) { PyErr_Format(PyExc_IOError, "invalid handle %" PY_FORMAT_SIZE_T "d", (Py_ssize_t)handle); return NULL;