[issue8184] multiprocessing.managers will not fail if listening ocket already in use

Antoine Pitrou report at bugs.python.org
Fri Jan 6 13:30:38 CET 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

Le vendredi 06 janvier 2012 à 02:18 +0000, Phill a écrit :
> Phill <beerb0x at gmail.com> added the comment:
> 
> Rather than listening on a socket, listening on a named pipe
> 
> eg:
> address = (r'\\.\pipe\Test', 'AF_PIPE')
> listener = Listener(*address)
> conn = listener.accept()
> 
> It doesnt raise an exception when i run the script again a second time.

According to MSDN, this is normal:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365150%28v=vs.85%29.aspx

However, there's also a flag named FILE_FLAG_FIRST_PIPE_INSTANCE that we
could use in PipeListener, which would then raise an error if a listener
pipe was created a second time. It would probably make more sense,
although I don't know whether some programs may rely on creating a pipe
multiple times.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8184>
_______________________________________


More information about the Python-bugs-list mailing list