diff --git a/cmd-attach-session.c b/cmd-attach-session.c index cc2006f1..9e800774 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -94,7 +94,7 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx) ctx->cmdclient->session = s; notify_attached_session_changed(ctx->cmdclient); session_update_activity(s); - server_write_client(ctx->cmdclient, MSG_READY, NULL, 0); + server_write_ready(ctx->cmdclient); update = options_get_string(&s->options, "update-environment"); environ_update(update, &ctx->cmdclient->environ, &s->environ); diff --git a/cmd-new-session.c b/cmd-new-session.c index e7d21d3b..e8db7cc7 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -231,7 +231,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx) */ if (!detached) { if (ctx->cmdclient != NULL) { - server_write_client(ctx->cmdclient, MSG_READY, NULL, 0); + server_write_ready(ctx->cmdclient); old_s = ctx->cmdclient->session; if (old_s != NULL) diff --git a/server-fn.c b/server-fn.c index 9f51a9e7..d95c498c 100644 --- a/server-fn.c +++ b/server-fn.c @@ -46,6 +46,12 @@ server_fill_environ(struct session *s, struct environ *env) environ_set(env, "TMUX", var); } +void +server_write_ready(struct client *c) +{ + server_write_client(c, MSG_READY, NULL, 0); +} + int server_write_client( struct client *c, enum msgtype type, const void *buf, size_t len) diff --git a/tmux.h b/tmux.h index 7679caca..293abfd9 100644 --- a/tmux.h +++ b/tmux.h @@ -1739,6 +1739,7 @@ void server_window_loop(void); /* server-fn.c */ void server_fill_environ(struct session *, struct environ *); +void server_write_ready(struct client *); int server_write_client( struct client *, enum msgtype, const void *, size_t); void server_write_session(