We are currently a bit sloppy when it comes to handling the pipe handles for subprocesses on Windows. AppVerifier even makes the client crash because it has tests that make sure you use file handles in a safe way.
The primary problem is that WinPopenProcess closes the pipes, even though ServiceProcess is still using them.
It might be sufficient to throw a couple of Fl::check() in WinProcess::KillProcess() to make sure ServiceProcess notices that the pipe is closed.
Related, we also need to fix WinPopenProcess so that it doesn't close the pipes until _after_ the process has been terminated.
(see bug 4815 and bug 4569 for the AppVerifier crashes)
All done. Tester should run tlclient -d5 and look for PeekNamedPipe errors, and that logging seems complete. Probably also best to test with AppVerifier for the previously seen crashes.
Created attachment 527 [details]
Got a new backtrace in tlclient, right after hitting connect button.
Created attachment 529 [details]
Whatever this is, it is not this bug. AppVerifier makes PeekNamedPipe() return ERROR_NOACCESS randomly on perfectly valid file handles. Adding bug 5087 instead.
Tested using client build 4323, works as expected. No errors in log file when trying to provoke killing sub processes to client.