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

Diff for /src/usr.bin/ssh/sftp.c between version 1.183 and 1.184

version 1.183, 2018/04/10 00:10:49 version 1.184, 2018/04/13 05:04:12
Line 231 
Line 231 
         errno = olderrno;          errno = olderrno;
 }  }
   
   /*ARGSUSED*/
 static void  static void
   sigchld_handler(int sig)
   {
           int save_errno = errno;
           pid_t pid;
           const char msg[] = "\rConnection closed.  \n";
   
           /* Report if ssh transport process dies. */
           while ((pid = waitpid(sshpid, NULL, WNOHANG)) == -1 && errno == EINTR)
                   continue;
           if (pid == sshpid)
                   (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
   
           errno = save_errno;
   }
   
   static void
 help(void)  help(void)
 {  {
         printf("Available commands:\n"          printf("Available commands:\n"
Line 2192 
Line 2209 
                 if (err != 0)                  if (err != 0)
                         break;                          break;
         }          }
           signal(SIGCHLD, SIG_DFL);
         free(remote_path);          free(remote_path);
         free(startdir);          free(startdir);
         free(conn);          free(conn);
Line 2248 
Line 2266 
         signal(SIGTSTP, suspchild);          signal(SIGTSTP, suspchild);
         signal(SIGTTIN, suspchild);          signal(SIGTTIN, suspchild);
         signal(SIGTTOU, suspchild);          signal(SIGTTOU, suspchild);
           signal(SIGCHLD, sigchld_handler);
         close(c_in);          close(c_in);
         close(c_out);          close(c_out);
 }  }

Legend:
Removed from v.1.183  
changed lines
  Added in v.1.184