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

Diff for /src/usr.bin/ssh/scp.c between version 1.165 and 1.166

version 1.165, 2009/12/20 07:28:36 version 1.166, 2010/07/01 13:06:59
Line 140 
Line 140 
         exit(1);          exit(1);
 }  }
   
   static void
   suspchild(int signo)
   {
           int status;
   
           if (do_cmd_pid > 1) {
                   kill(do_cmd_pid, signo);
                   while (waitpid(do_cmd_pid, &status, WUNTRACED) == -1 &&
                       errno == EINTR)
                           ;
                   kill(getpid(), SIGSTOP);
           }
   }
   
 static int  static int
 do_local_cmd(arglist *a)  do_local_cmd(arglist *a)
 {  {
Line 215 
Line 229 
         /* Free the reserved descriptors. */          /* Free the reserved descriptors. */
         close(reserved[0]);          close(reserved[0]);
         close(reserved[1]);          close(reserved[1]);
   
           signal(SIGTSTP, suspchild);
           signal(SIGTTIN, suspchild);
           signal(SIGTTOU, suspchild);
   
         /* Fork a child to execute the command on the remote host using ssh. */          /* Fork a child to execute the command on the remote host using ssh. */
         do_cmd_pid = fork();          do_cmd_pid = fork();

Legend:
Removed from v.1.165  
changed lines
  Added in v.1.166