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

Diff for /src/usr.bin/ssh/session.c between version 1.330 and 1.331

version 1.330, 2022/02/08 08:59:12 version 1.331, 2023/01/06 02:39:59
Line 2015 
Line 2015 
 }  }
   
 static void  static void
 session_close_single_x11(struct ssh *ssh, int id, void *arg)  session_close_single_x11(struct ssh *ssh, int id, int force, void *arg)
 {  {
         Session *s;          Session *s;
         u_int i;          u_int i;
Line 2146 
Line 2146 
  * the session 'child' itself dies   * the session 'child' itself dies
  */   */
 void  void
 session_close_by_channel(struct ssh *ssh, int id, void *arg)  session_close_by_channel(struct ssh *ssh, int id, int force, void *arg)
 {  {
         Session *s = session_by_channel(id);          Session *s = session_by_channel(id);
         u_int i;          u_int i;
Line 2159 
Line 2159 
         if (s->pid != 0) {          if (s->pid != 0) {
                 debug_f("channel %d: has child, ttyfd %d", id, s->ttyfd);                  debug_f("channel %d: has child, ttyfd %d", id, s->ttyfd);
                 /*                  /*
                  * delay detach of session, but release pty, since                   * delay detach of session (unless this is a forced close),
                  * the fd's to the child are already closed                   * but release pty, since the fd's to the child are already
                    * closed
                  */                   */
                 if (s->ttyfd != -1)                  if (s->ttyfd != -1)
                         session_pty_cleanup(s);                          session_pty_cleanup(s);
                 return;                  if (!force)
                           return;
         }          }
         /* detach by removing callback */          /* detach by removing callback */
         channel_cancel_cleanup(ssh, s->chanid);          channel_cancel_cleanup(ssh, s->chanid);

Legend:
Removed from v.1.330  
changed lines
  Added in v.1.331