When exiting the client on Windows it takes some time (5-10 seconds) before every process is terminated. There seems to be some delay between stopping each process I.e. * Vncviewer dies. * Delay. * putty dies. * Delay. * polypaudio dies.
Need more info here to be able to estimate time. What is the final objective? "As fast as possible"? "1 second"?
I see no point in artificial delays here, so ASAP.
Bug 1561 is affected by this as it takes some time for the dialog to appear.
The problem seems to be that we use a bad approach for killing processes. We send a WM_CLOSE to every window of each subprocess, and expect that to end up with the process terminating. Since most of our subprocesses lack windows, this of course fails. What we should do is post WM_QUIT to the process message queue for each program. But we also need to modify the programs to actually respond to this message.
Changed to sending WM_QUIT in r27960. FLTK (and hence vncviewer) was modified to respect it in r27962.
There is also an issue with output being lost whilst we wait for the process to terminate. That probably needs to be handled as part of this work.
(In reply to comment #6) > There is also an issue with output being lost whilst we wait for the process to > terminate. That probably needs to be handled as part of this work. Will probably be fixed as part of bug 4886.
Processes that need to be fixed: - pcsctun - sercd - ssh - unfsd
Also note that the problem with ssh.exe adds 2 extra seconds to a login.
We mustn't forget the fact that because of this we do a hard kill of our processes which means they won't have an opportunity to exit and clean up properly. E.g. unfsd might not be able to finish writing things to disk.
(In reply to comment #10) > Also note that the problem with ssh.exe adds 2 extra seconds to a login. This was moved to bug 7082.
(In reply to Pierre Ossman from comment #3) > Bug 1561 is affected by this as it takes some time for the dialog to appear. No longer the case as of r37752 for bug 7479.
This is what it looks like in tlclient.log on Windows (should make it easier to find this bug when searching): > WinProcess: Process 284 (ssh.exe) did not exit in a timely manner. Forcing termination... > WinProcess: Process 10572 (pcsctun.exe) did not exit in a timely manner. Forcing termination...