This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amyodov
Recipients amyodov
Date 2010-06-28.12:54:57
SpamBayes Score 0.00027890163
Marked as misclassified No
Message-id <1277729700.77.0.590017326086.issue9099@psf.upfronthosting.co.za>
In-reply-to
Content
I am using Python 2.6.5/win32, and working with multiprocessing module, doing that with Python interpreter embedded using Cython (if that may be related to the problem).

While creating a subprocess and a Pipe to communicate with it, I've got the following traceback (particulaly on the line "parent_conn, child_conn = Pipe()"):

Traceback (most recent call last):
  File "test_fork.py", line 24, in init test_fork (test_fork.c:810)
    vasia.main()
  File "Z:\multiprocessing_cython_w32\vasia.py", line 15, in main
    parent_conn, child_conn = Pipe()
  File "Z:\python-win32\2.6.5\Lib\multiprocessing\__init__.py", line 106, in Pipe
    return Pipe(duplex)
  File "Z:\python-win32\2.6.5\Lib\multiprocessing\connection.py", line 202, in Pipe
    h2, win32.PIPE_READMODE_MESSAGE, None, None
WindowsError: [Error 0] Success

Lines 202-204 in multiprocessing/connection.py contain the following: 

        win32.SetNamedPipeHandleState(                                                                                             
            h2, win32.PIPE_READMODE_MESSAGE, None, None                                                                            
            ) 

It seems to me that for some reason SetNamedPipeHandleState might be returning 0 even while it didn't fail actually; a quick check confirmed that it could be fixed by changing the above lines to the following:

        try:                                                                                                                       
            win32.SetNamedPipeHandleState(                                                                                         
                h2, win32.PIPE_READMODE_MESSAGE, None, None                                                                        
                )                                                                                                                  
        except WindowsError, e:                                                                                                    
(win32)                                                                                                       
            if e.args[0] != 0: # 0 is error code for SUCCESS                                                                       
                raise
History
Date User Action Args
2010-06-28 12:55:00amyodovsetrecipients: + amyodov
2010-06-28 12:55:00amyodovsetmessageid: <1277729700.77.0.590017326086.issue9099@psf.upfronthosting.co.za>
2010-06-28 12:54:58amyodovlinkissue9099 messages
2010-06-28 12:54:57amyodovcreate