]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Mark handles defunct before calling gotdata/sentdata.
authorSimon Tatham <anakin@pobox.com>
Sat, 7 Feb 2015 12:39:47 +0000 (12:39 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 7 Feb 2015 12:50:08 +0000 (12:50 +0000)
commit087ca595f3f612f0d2de1d406b5fcc751cdd3566
treef1f0493cc81b26af9d6d7ec54218a90c5c862333
parent7549f2da40d3666f2c9527d84d9ed5468e231691
Mark handles defunct before calling gotdata/sentdata.

If (say) a read handle returns EOF, and its gotdata function responds
by calling handle_free(), then we want the handle to have already had
its defunct flag set so that the handle can be destroyed. Otherwise
handle_free will set the 'done' flag to ask the subthread to
terminate, and then sit and wait for it to say it's done so -
forgetting that it signalled termination already by returning EOF, and
hence will not be responding to that signal.

Ditto for write errors on write handles, though that should happen
less often.
windows/winhandl.c