@owenv could you share a way to repro those hangs?
FWIW we should probably converge onto a single approach there and here. JSONRPCConnection is a pretty thin wrapper around the subprocess, so if swift-subprocess is the plan there then maybe we should also be doing it here, unless I’m missing something (hopefully it’s not DispatchIO based as then we’re back to the original problem..). All the wrapper needs is post data to stdin, realtime handler of stdout and a way to properly handling close()
And btw I did end up running into issues with close() during local testing as there is a specific test testCloseRace here which catches an issue that I’m yet to investigate