> How does all this work? Are there buffers anywhere?
There are buffers everywhere -- but not in TCC.
> Is program execution paced by the console's ability to
> display output or can output accumulate somewhere
> (before it appears in the console)?
That's up to the individual programs. Some buffer (i.e., with something
like fputs / fwrite / fprintf), and some don't. Some flush their buffers
when exiting, some don't.
> And what **should** happen when a plugin command catches ^C
> and initiates its own clean-up routines?
There is no standard. Some programs eat it and continue as though nothing
happened. Some die instantly; some meander on for a while and eventually
shut down.
> If the Ctrl handler passes the signal to TCC is the plugin
> function allowed to continue until it returns (having
> completed its clean-up) or is there the possibility that
> it will be interrupted (and perhaps not finish cleaning up)?
The exception is happening in a different thread, with a (very) limited
stack. You shouldn't be trying to do something very complicated, or you'll
likely blow the stack. (This is Windows, not TCC.)
All TCC does in its exception handler is set a flag that a ^C / ^Break
occurred. TCC then periodically checks for that flag when it's looping in
potentially long-running code.