Richard Oudkerk <shibt...@gmail.com> added the comment:

The documentation page for ConnectNamedPipe 
(http://msdn.microsoft.com/en-us/library/windows/desktop/aa365146(v=vs.85).aspx)
 has a "community addition" which says that ConnectNamedPipe will appear to 
fail with ERROR_NO_DATA (232) if a client has previously connected, written 
some data and disconnected.

That seems to be what is happening.  For example

  Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on 
win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import multiprocessing.connection as con
  >>> l = con.Listener()
  >>> c = con.Client(l.address)
  >>> c.send("hello")
  >>> c.close()
  >>> l.accept()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "c:\Python27\lib\multiprocessing\connection.py", line 145, in accept
      c = self._listener.accept()
    File "c:\Python27\lib\multiprocessing\connection.py", line 345, in accept
      win32.ConnectNamedPipe(handle, win32.NULL)
  WindowsError: [Error 232] The pipe is being closed

I will look in to it.  The community addition says to just treat ERROR_NO_DATA 
as success.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to