PuTTY semi-bug dup-sessions-dont-close

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Privacy | Changes | Wishlist

summary: On Windows, parent session doesn't close until child does
class: semi-bug: This might or might not be a bug, depending on your precise definition of what a bug is.
difficulty: fun: Just needs tuits, and not many of them.
present-in: 0.57 0.58 2005-07-11 2005-08-04
fixed-in: 4455604dbce2d175ce1d601d51472bb1b0a535d8 (0.69)

On Win2K/XP, if a session B is started via "Duplicate Session" from a previous session A, the connection associated with A doesn't go away on the server until session B is closed (the TCP connection remains up as seen by netstat on both client and server). This can cause processes to hang around, especially if session A is closed rudely (with Alt-F4, for example).

This isn't observed on Win98.

This is presumably the sort of inheritance of handles/sockets that r5468 was supposed to deal with. In 0.57 (prior to that change), the same occurs with "New Session" too, which lends support to that theory. (I didn't observe this with 0.58, although there is a report of it happening even there with 0.58 on XP.)

We might want to make all our sockets non-inheritable with DuplicateHandle()/CloseHandle(). (I haven't found documentation of how you get a handle from a socket, but I've been assured that a socket is a handle, and can just be passed in with appropriate casts.)

When config-struct is implemented, it might be possible to avoid passing strange handles about entirely, which might avoid this sort of problem.


If you want to comment on this web site, see the Feedback page.
Audit trail for this semi-bug.
(last revision of this bug record was at 2017-04-28 16:52:45 +0100)