summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authornicm <nicm>2015-10-27 13:23:24 +0000
committernicm <nicm>2015-10-27 13:23:24 +0000
commit07b0ea03c33893bd2b104db5ea4e1397f92e0477 (patch)
treec24ffdc1db106d5b81ce943c0567f186484ef5eb /cmd-new-session.c
parent9952201ca72b42819d64a9174fa7b5b898215668 (diff)
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.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c7
1 files changed, 4 insertions, 3 deletions
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);