[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread Antoine Pitrou
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11657 ___ ___

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread Antoine Pitrou
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) --

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread Roundup Robot
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread Roundup Robot
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 --

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-23 Thread Antoine Pitrou
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-22 Thread Nick Coghlan
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-22 Thread Charles-François Natali
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-21 Thread Charles-François Natali
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,

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-21 Thread Jesse Noller
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-21 Thread Jesse Noller
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-21 Thread Charles-François Natali
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-21 Thread Petri Lehtinen
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-01 Thread Petri Lehtinen
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? --

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-08-01 Thread Ben Darnell
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-07-28 Thread Petri Lehtinen
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:

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-07-28 Thread Jean-Paul Calderone
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

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-03-24 Thread Antoine Pitrou
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 ___

[issue11657] multiprocessing_{send,recv}fd fail with fds 256

2011-03-23 Thread Ben Darnell
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