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.
This commit is contained in:
nicm
2013-10-20 17:28:43 +00:00
parent f52eac6225
commit bf35441608
4 changed files with 25 additions and 3 deletions

View File

@ -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) {