summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authornicm <nicm>2013-10-20 17:28:43 +0000
committernicm <nicm>2013-10-20 17:28:43 +0000
commitbf35441608b05d52627215aa70bd52d9460812d4 (patch)
treebfca70f3b3a04d09511654a960fa5389cde22d37 /server.c
parentf52eac62259c431daac84ddb6c2a5b7ebd528c2c (diff)
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.
Diffstat (limited to 'server.c')
-rw-r--r--server.c3
1 files changed, 3 insertions, 0 deletions
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) {