diff --git a/client.c b/client.c index fc3c12fd..552cfe90 100644 --- a/client.c +++ b/client.c @@ -406,9 +406,11 @@ client_signal(int sig, unused short events, unused void *data) client_exitval = 1; client_write_server(MSG_EXITING, NULL, 0); break; +#ifndef TMATE_SLAVE case SIGWINCH: client_write_server(MSG_RESIZE, NULL, 0); break; +#endif case SIGCONT: memset(&sigact, 0, sizeof sigact); sigemptyset(&sigact.sa_mask); diff --git a/tmate-ssh-client-pty.c b/tmate-ssh-client-pty.c index a31220a0..b36910af 100644 --- a/tmate-ssh-client-pty.c +++ b/tmate-ssh-client-pty.c @@ -1,8 +1,10 @@ -#include "tmate.h" #include #include #include #include +#include "tmate.h" + +extern void client_write_server(enum msgtype type, void *buf, size_t len); static void consume_channel(struct tmate_ssh_client *client) { @@ -63,10 +65,8 @@ static int message_callback(struct tmate_ssh_client *client, ws.ws_col = ssh_message_channel_request_pty_width(msg); ws.ws_row = ssh_message_channel_request_pty_height(msg); - tmate_debug("change window size to %d, %d", - ws.ws_col, ws.ws_row); ioctl(client->pty, TIOCSWINSZ, &ws); - kill(getpid(), SIGWINCH); + client_write_server(MSG_RESIZE, NULL, 0); return 1; }