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

Diff for /src/usr.bin/ssh/readpass.c between version 1.60 and 1.61

version 1.60, 2019/12/06 03:06:08 version 1.61, 2020/01/23 07:10:22
Line 62 
Line 62 
                 error("%s: pipe: %s", __func__, strerror(errno));                  error("%s: pipe: %s", __func__, strerror(errno));
                 return NULL;                  return NULL;
         }          }
         osigchld = signal(SIGCHLD, SIG_DFL);          osigchld = ssh_signal(SIGCHLD, SIG_DFL);
         if ((pid = fork()) == -1) {          if ((pid = fork()) == -1) {
                 error("%s: fork: %s", __func__, strerror(errno));                  error("%s: fork: %s", __func__, strerror(errno));
                 signal(SIGCHLD, osigchld);                  ssh_signal(SIGCHLD, osigchld);
                 return NULL;                  return NULL;
         }          }
         if (pid == 0) {          if (pid == 0) {
Line 95 
Line 95 
         while ((ret = waitpid(pid, &status, 0)) == -1)          while ((ret = waitpid(pid, &status, 0)) == -1)
                 if (errno != EINTR)                  if (errno != EINTR)
                         break;                          break;
         signal(SIGCHLD, osigchld);          ssh_signal(SIGCHLD, osigchld);
         if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {          if (ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
                 explicit_bzero(buf, sizeof(buf));                  explicit_bzero(buf, sizeof(buf));
                 return NULL;                  return NULL;
Line 240 
Line 240 
                 free(prompt);                  free(prompt);
                 return NULL;                  return NULL;
         }          }
         osigchld = signal(SIGCHLD, SIG_DFL);          osigchld = ssh_signal(SIGCHLD, SIG_DFL);
         if ((pid = fork()) == -1) {          if ((pid = fork()) == -1) {
                 error("%s: fork: %s", __func__, strerror(errno));                  error("%s: fork: %s", __func__, strerror(errno));
                 signal(SIGCHLD, osigchld);                  ssh_signal(SIGCHLD, osigchld);
                 free(prompt);                  free(prompt);
                 return NULL;                  return NULL;
         }          }
Line 286 
Line 286 
         }          }
         if (ret == -1)          if (ret == -1)
                 fatal("%s: waitpid: %s", __func__, strerror(errno));                  fatal("%s: waitpid: %s", __func__, strerror(errno));
         signal(SIGCHLD, ctx->osigchld);          ssh_signal(SIGCHLD, ctx->osigchld);
         free(ctx);          free(ctx);
 }  }

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61