mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00

This is only intended for use in Unix Pageant; for any application that's actually trying to get something else useful done at the same time as the agent request is pending, it's much more sensible to use the more rigorous existing approach of requesting a callback once the agent request is answered. Adding this mode is the easiest way to allow Unix Pageant's command-line key loading to work, but it doesn't solve the underlying problem that the supposedly cross-platform pageant_add_keyfile will not work on a platform where we really _are_ constrained to do agent requests asynchronously (perhaps because we're a GUI app in some system that doesn't let us control our own top-level event loop). If and when that situation arises, I'll have no choice but to turn pageant_add_keyfile and friends (specifically, any function in pageant.c that calls agent_query) into coroutine-structured functions, and have clients call them repeatedly until they return 'finished'. But for now, this is a lot easier!