[BACK]Return to clientloop.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/clientloop.c between version 1.131 and 1.132

version 1.131, 2004/09/07 23:41:30 version 1.132, 2004/10/29 21:47:15
Line 432 
Line 432 
 static void  static void
 client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)  client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
 {  {
         struct winsize oldws, newws;  
   
         /* Flush stdout and stderr buffers. */          /* Flush stdout and stderr buffers. */
         if (buffer_len(bout) > 0)          if (buffer_len(bout) > 0)
                 atomicio(vwrite, fileno(stdout), buffer_ptr(bout), buffer_len(bout));                  atomicio(vwrite, fileno(stdout), buffer_ptr(bout), buffer_len(bout));
Line 450 
Line 448 
         buffer_free(bout);          buffer_free(bout);
         buffer_free(berr);          buffer_free(berr);
   
         /* Save old window size. */  
         ioctl(fileno(stdin), TIOCGWINSZ, &oldws);  
   
         /* Send the suspend signal to the program itself. */          /* Send the suspend signal to the program itself. */
         kill(getpid(), SIGTSTP);          kill(getpid(), SIGTSTP);
   
         /* Check if the window size has changed. */          /* Reset window sizes in case they have changed */
         if (ioctl(fileno(stdin), TIOCGWINSZ, &newws) >= 0 &&          received_window_change_signal = 1;
             (oldws.ws_row != newws.ws_row ||  
             oldws.ws_col != newws.ws_col ||  
             oldws.ws_xpixel != newws.ws_xpixel ||  
             oldws.ws_ypixel != newws.ws_ypixel))  
                 received_window_change_signal = 1;  
   
         /* OK, we have been continued by the user. Reinitialize buffers. */          /* OK, we have been continued by the user. Reinitialize buffers. */
         buffer_init(bin);          buffer_init(bin);
Line 1204 
Line 1194 
                 signal(SIGQUIT, signal_handler);                  signal(SIGQUIT, signal_handler);
         if (signal(SIGTERM, SIG_IGN) != SIG_IGN)          if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
                 signal(SIGTERM, signal_handler);                  signal(SIGTERM, signal_handler);
         if (have_pty)          signal(SIGWINCH, window_change_handler);
                 signal(SIGWINCH, window_change_handler);  
   
         if (have_pty)          if (have_pty)
                 enter_raw_mode();                  enter_raw_mode();
Line 1313 
Line 1302 
         /* Terminate the session. */          /* Terminate the session. */
   
         /* Stop watching for window change. */          /* Stop watching for window change. */
         if (have_pty)          signal(SIGWINCH, SIG_DFL);
                 signal(SIGWINCH, SIG_DFL);  
   
         channel_free_all();          channel_free_all();
   
Line 1681 
Line 1669 
     dispatch_fn *subsys_repl)      dispatch_fn *subsys_repl)
 {  {
         int len;          int len;
           Channel *c = NULL;
   
         debug2("%s: id %d", __func__, id);          debug2("%s: id %d", __func__, id);
   
           if ((c = channel_lookup(id)) == NULL)
                   fatal("client_session2_setup: channel %d: unknown channel", id);
   
         if (want_tty) {          if (want_tty) {
                 struct winsize ws;                  struct winsize ws;
                 struct termios tio;                  struct termios tio;
Line 1702 
Line 1694 
                 tty_make_modes(-1, tiop != NULL ? tiop : &tio);                  tty_make_modes(-1, tiop != NULL ? tiop : &tio);
                 packet_send();                  packet_send();
                 /* XXX wait for reply */                  /* XXX wait for reply */
                   c->client_tty = 1;
         }          }
   
         /* Transfer any environment variables from client to server */          /* Transfer any environment variables from client to server */

Legend:
Removed from v.1.131  
changed lines
  Added in v.1.132