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

2011-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed a patch with some tests. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

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

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

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

2011-08-23 Thread Roundup Robot
Roundup Robot 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 Pitrou in branch 'default': Issue #

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

2011-08-23 Thread Antoine Pitrou
Antoine Pitrou 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 STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2011-08-23 Thread Antoine Pitrou
Antoine Pitrou 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 themselves (note the

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

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

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

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

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

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

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

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

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

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

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

2011-08-21 Thread Jesse Noller
Jesse Noller added the comment: Yes, Charles - the test is not only welcome, but needed - it just can't rely on reading /etc/fstab ;) -- ___ Python tracker ___

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

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

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

2011-08-01 Thread Ben Darnell
Ben Darnell added the comment: These functions are used when passing a socket object across a multiprocessing.Queue. -- ___ Python tracker ___ _

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

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

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

2011-07-28 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Thanks for the patch Petri. Are you interested in writing a unit test for this as well? -- nosy: +exarkun ___ Python tracker ___ ___

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

2011-07-28 Thread Petri Lehtinen
Petri Lehtinen 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: http://bugs.python.org/file22786/issue11657.patch

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

2011-03-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +asksol, jnoller versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___

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

2011-03-23 Thread Ben Darnell
New submission from Ben Darnell : 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 initialized with zeros). 