Provide more helpful error message on lack of -t argument.

This commit is contained in:
Keith Winstein
2012-04-14 12:29:05 -04:00
parent 5c20c8d4be
commit 1823f7e860
+1
View File
@@ -219,6 +219,7 @@ int run_server( const char *desired_ip, const char *desired_port,
struct winsize window_size; struct winsize window_size;
if ( ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) < 0 ) { if ( ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) < 0 ) {
perror( "ioctl TIOCGWINSZ" ); perror( "ioctl TIOCGWINSZ" );
fprintf( stderr, "If running with ssh, please use -t argument to provide a PTY.\n" );
exit( 1 ); exit( 1 );
} }