diff options
author | dtucker <dtucker> | 2005-01-24 10:57:40 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2005-01-24 10:57:40 +0000 |
commit | 7a228a7e6d3b350936f0e584cc871b8d03f6953d (patch) | |
tree | 40f704aedb27b77b5b61ebb2f900d94bd3e69feb /sftp.c | |
parent | 150f049af8c888474b56de8d7d3a386c246622a1 (diff) | |
download | openssh-7a228a7e6d3b350936f0e584cc871b8d03f6953d.tar.gz |
- 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@
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } |