summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/scp.c6
-rw-r--r--usr.bin/ssh/sftp.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index c7a46cdbf2b..a014442aae0 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/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/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index f8150600727..cf65266005f 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/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 $");
#include <glob.h>
#include <histedit.h>
@@ -145,8 +145,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);
}