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 /scp.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 'scp.c')
-rw-r--r-- | scp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); } |