terminal: fix sporadic freeze on font-size changes

The direct execution of application-level code by a watch handler is
troublesome because those handlers are executed at the I/O signal level.
In the concrete case, the watch handler got recursively called because
the handler called _handle_config (application-code), which called the
VFS, which in turn performed a wait_and_dispatch_one_io_signal, which
again invoked the watch handler.

The patch works around the problem by letting the watch notification
trigger the application-level signal for the _config_handler.

Fixes #4091
This commit is contained in:
Norman Feske 2021-04-26 15:47:36 +02:00
parent bb6617ad03
commit 9cb8c37e3a

View File

@ -77,7 +77,7 @@ struct Terminal::Main : Character_consumer
* at construction time.
*/
if (_font.constructed())
_handle_config();
_config_handler.local_submit();
}
Watch_handler<Main> _glyphs_changed_handler {