EVALUATION
We use the Windows Named Pipe APIs in blocking mode, and in this mode
some of the APIs such as ConnectNamedPipe, DisconnectNamedPipe and
even CloseHandle can block indefinitely. If the server never receives
a connection from the client, it will hang in ConnectNamedPipe, and
even if a second thread attempts to shut down the pipe via
CloseHandle, the second thread will hang indefinitely.
Worked around this issue by moving connection and shutdown calls on
the server side on to separate threads. In order for higher level
layers to work (for example, the JVM restarting mechanism when illegal
command-line arguments are specified), the initial writes must not
block, and their state must not be lost. Added workarounds for this
issue.
|