diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-23 17:46:22 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-23 17:46:22 (GMT) |
commit | bcb39d484628f55ffc3205e9ddd0166093695e50 (patch) | |
tree | d9ed8b2ced3146e0145415e1e9c13b505cbc752e /Modules | |
parent | 5bd8b8d80fd0e038be43beb95ba29cd2bd93e965 (diff) | |
download | cpython-bcb39d484628f55ffc3205e9ddd0166093695e50.zip cpython-bcb39d484628f55ffc3205e9ddd0166093695e50.tar.gz cpython-bcb39d484628f55ffc3205e9ddd0166093695e50.tar.bz2 |
Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_multiprocessing/multiprocessing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c index 7c4f52d..9de9279 100644 --- a/Modules/_multiprocessing/multiprocessing.c +++ b/Modules/_multiprocessing/multiprocessing.c @@ -122,7 +122,7 @@ multiprocessing_sendfd(PyObject *self, PyObject *args) cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); msg.msg_controllen = cmsg->cmsg_len; - *CMSG_DATA(cmsg) = fd; + * (int *) CMSG_DATA(cmsg) = fd; Py_BEGIN_ALLOW_THREADS res = sendmsg(conn, &msg, 0); @@ -165,7 +165,7 @@ multiprocessing_recvfd(PyObject *self, PyObject *args) if (res < 0) return PyErr_SetFromErrno(PyExc_OSError); - fd = *CMSG_DATA(cmsg); + fd = * (int *) CMSG_DATA(cmsg); return Py_BuildValue("i", fd); } |