Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mosh-server: allow startup with PTY with zero width or height like Em…

…acs shell.

Closes #472
Closes #473
  • Loading branch information...
commit 96bf5af1b4e8a8164cc004b942553a8ca88f55df 1 parent 2767894
@ibukanov ibukanov authored committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/frontend/mosh-server.cc
View
4 src/frontend/mosh-server.cc
@@ -325,7 +325,9 @@ int run_server( const char *desired_ip, const char *desired_port,
const int colors, bool verbose, bool with_motd ) {
/* get initial window size */
struct winsize window_size;
- if ( ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) < 0 ) {
+ if ( ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) < 0 ||
+ window_size.ws_col == 0 ||
+ window_size.ws_row == 0 ) {
fprintf( stderr, "Server started without pseudo-terminal. Opening 80x24 terminal.\n" );
/* Fill in sensible defaults. */
Please sign in to comment.
Something went wrong with that request. Please try again.