PuTTY semi-bug dup-sessions-dont-close

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

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

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.

Audit trail for this semi-bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2005-10-24 14:27:24 +0100)