From 07b0ea03c33893bd2b104db5ea4e1397f92e0477 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 27 Oct 2015 13:23:24 +0000 Subject: 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. --- cmd-new-session.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd-new-session.c') diff --git a/cmd-new-session.c b/cmd-new-session.c index b3bf3c74..f1a6167a 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -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); -- cgit