From 3b71998054e6e18b57c6ad30939da5b6866419ca Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 18 Aug 2014 14:18:24 +0200 Subject: [PATCH] nitpicker: load initial config before announcement This patch fixes a potential race condition that could happen if a client connects to nitpicker before the signal for the import of the initial configuration was delivered. In this case, nitpicker would be unable to assign a domain to the session (because this information comes from the configuration), rendering subsequent calls to 'mode' invalid. The patch solves this problem by manually calling the signal handler for importing the configuration. --- repos/os/src/server/nitpicker/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/server/nitpicker/main.cc b/repos/os/src/server/nitpicker/main.cc index bd1e7fe84b..638bf9d5e6 100644 --- a/repos/os/src/server/nitpicker/main.cc +++ b/repos/os/src/server/nitpicker/main.cc @@ -1185,7 +1185,7 @@ struct Nitpicker::Main user_state.stack(background); config()->sigh(config_dispatcher); - Signal_transmitter(config_dispatcher).submit(); + handle_config(0); timer.sigh(input_dispatcher); timer.trigger_periodic(10*1000);