From 9cb8c37e3ac52e08bc7d66381409f5102c91c43e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 26 Apr 2021 15:47:36 +0200 Subject: [PATCH] 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 --- repos/gems/src/server/terminal/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/server/terminal/main.cc b/repos/gems/src/server/terminal/main.cc index 30c2c40e41..4b6d3a2dc7 100644 --- a/repos/gems/src/server/terminal/main.cc +++ b/repos/gems/src/server/terminal/main.cc @@ -77,7 +77,7 @@ struct Terminal::Main : Character_consumer * at construction time. */ if (_font.constructed()) - _handle_config(); + _config_handler.local_submit(); } Watch_handler
_glyphs_changed_handler {