Another bug fix: always set the busy flag when telling a subthread
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 26 Aug 2006 10:19:23 +0000 (10:19 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 26 Aug 2006 10:19:23 +0000 (10:19 +0000)
to do something, otherwise handle_get_events will forget to tell the
front end to check for that subthread finishing. This applies even
when we're only setting `busy' to tell the subthread to terminate!

git-svn-id: svn://svn.tartarus.org/sgt/putty@6805 cda61777-01e9-0310-a592-d414129be87e

windows/winhandl.c

index c7dc65b..a5b7c69 100644 (file)
@@ -391,6 +391,7 @@ void handle_free(struct handle *h)
         */
        h->u.g.moribund = TRUE;
        h->u.g.done = TRUE;
+       h->u.g.busy = TRUE;
        SetEvent(h->u.g.ev_from_main);
     }
 }
@@ -424,6 +425,7 @@ void handle_got_event(HANDLE event)
            handle_destroy(h);
        } else {
            h->u.g.done = TRUE;
+           h->u.g.busy = TRUE;
            SetEvent(h->u.g.ev_from_main);
        }
        return;