Break the common process set up, event loop and imsg dispatch code

between server and client out into a separate internal API. This will
make it easier to add another process.
This commit is contained in:
nicm
2015-10-27 13:23:24 +00:00
parent 9952201ca7
commit 07b0ea03c3
13 changed files with 648 additions and 614 deletions

View File

@ -270,9 +270,10 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
* taking this session and needs to get MSG_READY and stay around.
*/
if (!detached) {
if (!already_attached)
server_write_ready(c);
else if (c->session != NULL)
if (!already_attached) {
if (~c->flags & CLIENT_CONTROL)
proc_send(c->peer, MSG_READY, -1, NULL, 0);
} else if (c->session != NULL)
c->last_session = c->session;
c->session = s;
status_timer_start(c);