Bugzilla – Bug 4886
clean up subprocess pipe handling on Windows
Last modified: 2014-04-14 10:36:51
You need to
before you can comment on or make changes to this bug.
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
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 an attachment (id=527) [details]
Got a new backtrace in tlclient, right after hitting connect button.
Created an attachment (id=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
Tested using client build 4323, works as expected. No errors in log file when
trying to provoke killing sub processes to client.