[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.210 and 1.211

version 1.210, 2021/08/07 00:12:09 version 1.211, 2021/08/12 09:59:00
Line 230 
Line 230 
         errno = olderrno;          errno = olderrno;
 }  }
   
   /* ARGSUSED */
   static void
   read_interrupt(int signo)
   {
           interrupted = 1;
   }
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static void  static void
 sigchld_handler(int sig)  sigchld_handler(int sig)
Line 2168 
Line 2175 
                 const char *line;                  const char *line;
                 int count = 0;                  int count = 0;
   
                 ssh_signal(SIGINT, SIG_IGN);  
   
                 if (el == NULL) {                  if (el == NULL) {
                           ssh_signal(SIGINT, SIG_IGN);
                         if (interactive)                          if (interactive)
                                 printf("sftp> ");                                  printf("sftp> ");
                         if (fgets(cmd, sizeof(cmd), infile) == NULL) {                          if (fgets(cmd, sizeof(cmd), infile) == NULL) {
Line 2179 
Line 2185 
                                 break;                                  break;
                         }                          }
                 } else {                  } else {
                           struct sigaction sa;
   
                           interrupted = 0;
                           memset(&sa, 0, sizeof(sa));
                           sa.sa_handler = read_interrupt;
                           if (sigaction(SIGINT, &sa, NULL) == -1) {
                                   debug3("sigaction(%s): %s",
                                       strsignal(SIGINT), strerror(errno));
                                   break;
                           }
                         if ((line = el_gets(el, &count)) == NULL ||                          if ((line = el_gets(el, &count)) == NULL ||
                             count <= 0) {                              count <= 0) {
                                 printf("\n");                                  printf("\n");
                                   if (interrupted)
                                           continue;
                                 break;                                  break;
                         }                          }
                         history(hl, &hev, H_ENTER, line);                          history(hl, &hev, H_ENTER, line);

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.211