diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index 8b47ed9..d7988c5 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -433,6 +433,10 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network /* tell child process of resize */ const Parser::Resize *res = static_cast( us.get_action( i ) ); struct winsize window_size; + if ( ioctl( host_fd, TIOCGWINSZ, &window_size ) < 0 ) { + perror( "ioctl TIOCGWINSZ" ); + return; + } window_size.ws_col = res->width; window_size.ws_row = res->height; if ( ioctl( host_fd, TIOCSWINSZ, &window_size ) < 0 ) {