jimradford / superputty

The SuperPuTTY Window Manager for putty sessions
https://www.facebook.com/superputty
MIT License
1.91k stars 320 forks source link

Children attach improvement #851

Closed vityank closed 2 years ago

vityank commented 2 years ago

There is a long time outstanding issue, there during launch some PuTTY processes could stay detached(Float state), and nothing would connect them back in the same SP run. Chances of this increased with the number of open sessions and was almost non-existent below 10. However for ~20 sessions, yet still quite rare it could occur, requiring one SP restart at most cases. So I ignored the issue for years.

However, recently I've upgraded my VM Windows 10 from 1809 to new 21H2, and now the issue became interminent(9/10 runs SP loads with this issue). I've tested by reverting the VM snapshot to old Win10, there SP worked well again. So i started to research into this and it was long process. Today I found that some extra delay between Start and WaitForInputHandle calls, had a positive effect on this and continued to investigate. I've updated the children start code to load it maximized initially(As AttachToWindow always maximizes it later), and SP now always starts properly(Without extra delay). So it seems like timing issue of waiting for input and Putty window possibly starting minimized sometimes, or something like that.