-
Notifications
You must be signed in to change notification settings - Fork 204
Description
During the construction of win32PipeListener, an unused named pipe instance gets created. The ListenPipe constructor attempts to block this unused instance with a CreateFile call on line 354, but this cannot happen transactionally during the creation of the named pipe: between line 349, just after the instance is created, and line 354, an optimistic named pipe client can connect to the pipe instance before the listener itself has a chance to block it. This causes listener construction to fail, despite the existence of a valid client on the named pipe handle.
I have a general use case where this race condition cannot be worked around: the named pipe client starts the named pipe server, and uses the existence of the pipe name to assume that the server is ready to accept connections. I suspect that #67 may be caused by this race condition as well.