From bf35441608b05d52627215aa70bd52d9460812d4 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 20 Oct 2013 17:28:43 +0000 Subject: Do not run any command line command from the client which starts the server until after the configuration file completes. This prevents it racing against run-shell or if-shell in .tmux.conf that run in the background. --- server.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server.c') diff --git a/server.c b/server.c index ffc25db0..8ac9321e 100644 --- a/server.c +++ b/server.c @@ -168,6 +168,9 @@ server_start(int lockfd, char *lockfile) cfg_finished = 0; cfg_references = 1; ARRAY_INIT(&cfg_causes); + cfg_client = ARRAY_FIRST(&clients); + if (cfg_client != NULL) + cfg_client->references++; if (access(TMUX_CONF, R_OK) == 0) { if (load_cfg(TMUX_CONF, cfg_cmd_q, &cause) == -1) { -- cgit