Antoine Pitrou pit...@free.fr added the comment:
For 3.3, it may be relevant that send/recvmsg are now available via
the socket API (see #6560)
I think sendfds/recvfds helper methods could be added to the socket type, so
that programmers don't have to get the incantations right by
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
___
___
Antoine Pitrou pit...@free.fr added the comment:
Now that I think of it, it would be nice to add some simple tests for recvfd
and sendfd in test_multiprocessing.
(also, when os.dup2() is available, you can easily generate an arbitrary big
file descriptor)
--
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5b2f357989bb by Antoine Pitrou in branch '3.2':
Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
http://hg.python.org/cpython/rev/5b2f357989bb
New changeset 4e7a4e098f38 by Antoine
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d4d9a3e71897 by Antoine Pitrou in branch '2.7':
Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
http://hg.python.org/cpython/rev/d4d9a3e71897
--
Antoine Pitrou pit...@free.fr added the comment:
I committed a patch with some tests. Thank you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
For 3.3, it may be relevant that send/recvmsg are now available via the socket
API (see #6560)
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
Charles-François Natali neolo...@free.fr added the comment:
I'm fine if you fix it, as I'm currently really short on time myself.
OK, I'll go ahead.
For 3.3, it may be relevant that send/recvmsg are now available via the
socket API (see #6560).
Indeed. We might still need C code for the
Charles-François Natali neolo...@free.fr added the comment:
I looked at multiprocessing code, but didn't understand how to trigger a
call to these functions. Makes it hard to come up with a unit test...
Here's a sample test:
import _multiprocessing
import os
import socket
for i in range(4,
Jesse Noller jnol...@gmail.com added the comment:
Yes, Charles - the test is not only welcome, but needed - it just can't rely on
reading /etc/fstab ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
Jesse Noller jnol...@gmail.com added the comment:
Charles; you have +commit, it seems. I would welcome the patch and test (just
as long as the aforementioned reliance on /etc/fstab was removed).
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali neolo...@free.fr added the comment:
Charles; you have +commit, it seems.
Yeah, I could of course do this myself, but since Petri already
submitted a patch and seemed to be willing to update it with a test, I
thought he might be interested in this (I've also seen he's
Petri Lehtinen pe...@digip.org added the comment:
Charles-François Natali wrote:
Yeah, I could of course do this myself, but since Petri already
submitted a patch and seemed to be willing to update it with a test, I
thought he might be interested in this (I've also seen he's
participating to
Petri Lehtinen pe...@digip.org added the comment:
I looked at multiprocessing code, but didn't understand how to trigger a call
to these functions. Makes it hard to come up with a unit test...
Ben: Do you still remember how you stumbled upon this issue?
--
Ben Darnell ben.darn...@gmail.com added the comment:
These functions are used when passing a socket object across a
multiprocessing.Queue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
Petri Lehtinen pe...@digip.org added the comment:
Attached a patch for v2.7. It changes the assignments to memcpy() calls.
--
keywords: +easy, needs review, patch
nosy: +petri.lehtinen
stage: - patch review
versions: -Python 3.1
Added file:
Jean-Paul Calderone invalid@example.invalid added the comment:
Thanks for the patch Petri. Are you interested in writing a unit test for this
as well?
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +asksol, jnoller
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11657
___
New submission from Ben Darnell ben.darn...@gmail.com:
Line 125 of multiprocessing.c is *CMSG_DATA(cmsg) = fd;. CMSG_DATA returns
an unsigned char*, while fd is an int, so this code does not support file
descriptors 256 (additionally, I'm not sure if the buffer is guaranteed to be
19 matches
Mail list logo