mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 17:47:33 -05:00

I found last week that when a local proxy process terminated unexpectedly, Unix PuTTY went into a tight loop calling quit functions, because if idle_toplevel_callback_func is called from inside a subsidiary gtk_main then it will schedule a quit function and _not_ disable itself, so that that quit function keeps being rescheduled on subsequent calls. To fix, I've tried to make the whole handling of idle and quit functions more sensibly robust: we keep our own boolean flag indicating whether each of our functions has already been scheduled with GTK, and if so, we don't schedule the same one again. Also, when idle_toplevel_callback_func schedules a quit function, it should unschedule itself since it's now done everything it can until a gtk_main instance quits. [originally from svn r10100]