]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2005/01/24 10:22:06
authordtucker <dtucker>
Mon, 24 Jan 2005 10:57:40 +0000 (10:57 +0000)
committerdtucker <dtucker>
Mon, 24 Jan 2005 10:57:40 +0000 (10:57 +0000)
     [scp.c sftp.c]
     Have scp and sftp wait for the spawned ssh to exit before they exit
     themselves.  This prevents ssh from being unable to restore terminal
     modes (not normally a problem on OpenBSD but common with -Portable
     on POSIX platforms).  From peak at argo.troja.mff.cuni.cz (bz#950);
     ok djm@ markus@

ChangeLog
scp.c
sftp.c

index 1460c5d0c886df9b5c707e33a8a304413ef6914c..d52e56f6cf735ca7a407f2f61f54889db697717c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - djm@cvs.openbsd.org 2005/01/23 10:18:12
      [cipher.c]
      config option "Ciphers" should be case-sensitive; ok dtucker@
+   - dtucker@cvs.openbsd.org 2005/01/24 10:22:06
+     [scp.c sftp.c]
+     Have scp and sftp wait for the spawned ssh to exit before they exit
+     themselves.  This prevents ssh from being unable to restore terminal
+     modes (not normally a problem on OpenBSD but common with -Portable
+     on POSIX platforms).  From peak at argo.troja.mff.cuni.cz (bz#950);
+     ok djm@ markus@
 
 20050120
  - (dtucker) OpenBSD CVS Sync
diff --git a/scp.c b/scp.c
index 69b5fc6d360f629fe40697a0edc024ed05541bea..f69fd05fc66ff418a43f30d366ff7d84ca178b1e 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -71,7 +71,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.118 2004/09/15 18:46:04 deraadt Exp $");
+RCSID("$OpenBSD: scp.c,v 1.119 2005/01/24 10:22:06 dtucker Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -108,8 +108,10 @@ pid_t do_cmd_pid = -1;
 static void
 killchild(int signo)
 {
-       if (do_cmd_pid > 1)
+       if (do_cmd_pid > 1) {
                kill(do_cmd_pid, signo);
+               waitpid(do_cmd_pid, NULL, 0);
+       }
 
        _exit(1);
 }
diff --git a/sftp.c b/sftp.c
index 9e29cb02e14ff3e258dffb2b34e54851bdb09b49..31c634994225611d0fce4cd92a88b19bd8cc0b3a 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -16,7 +16,7 @@
 
 #include "includes.h"
 
-RCSID("$OpenBSD: sftp.c,v 1.60 2004/12/10 03:10:42 fgsch Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.61 2005/01/24 10:22:06 dtucker Exp $");
 
 #ifdef USE_LIBEDIT
 #include <histedit.h>
@@ -150,8 +150,10 @@ int interactive_loop(int fd_in, int fd_out, char *file1, char *file2);
 static void
 killchild(int signo)
 {
-       if (sshpid > 1)
+       if (sshpid > 1) {
                kill(sshpid, SIGTERM);
+               waitpid(sshpid, NULL, 0);
+       }
 
        _exit(1);
 }
This page took 0.046644 seconds and 5 git commands to generate.