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

@ -155,8 +155,8 @@ server_client_lost(struct client *c)
free(c->ttyname);
free(c->term);
evbuffer_free (c->stdin_data);
evbuffer_free (c->stdout_data);
evbuffer_free(c->stdin_data);
evbuffer_free(c->stdout_data);
if (c->stderr_data != c->stdout_data)
evbuffer_free (c->stderr_data);
@ -932,7 +932,10 @@ server_client_msg_command(struct client *c, struct imsg *imsg)
}
cmd_free_argv(argc, argv);
cmdq_run(c->cmdq, cmdlist);
if (c != cfg_client || cfg_finished)
cmdq_run(c->cmdq, cmdlist);
else
cmdq_append(c->cmdq, cmdlist);
cmd_list_free(cmdlist);
return;