- 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@
This commit is contained in:
parent
660db78af2
commit
ba66df81a3
|
@ -12,6 +12,13 @@
|
||||||
- djm@cvs.openbsd.org 2005/01/23 10:18:12
|
- djm@cvs.openbsd.org 2005/01/23 10:18:12
|
||||||
[cipher.c]
|
[cipher.c]
|
||||||
config option "Ciphers" should be case-sensitive; ok dtucker@
|
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
|
20050120
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
@ -2030,4 +2037,4 @@
|
||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3623 2005/01/24 10:57:11 dtucker Exp $
|
$Id: ChangeLog,v 1.3624 2005/01/24 10:57:40 dtucker Exp $
|
||||||
|
|
6
scp.c
6
scp.c
|
@ -71,7 +71,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
|
@ -108,8 +108,10 @@ pid_t do_cmd_pid = -1;
|
||||||
static void
|
static void
|
||||||
killchild(int signo)
|
killchild(int signo)
|
||||||
{
|
{
|
||||||
if (do_cmd_pid > 1)
|
if (do_cmd_pid > 1) {
|
||||||
kill(do_cmd_pid, signo);
|
kill(do_cmd_pid, signo);
|
||||||
|
waitpid(do_cmd_pid, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|
6
sftp.c
6
sftp.c
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "includes.h"
|
#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
|
#ifdef USE_LIBEDIT
|
||||||
#include <histedit.h>
|
#include <histedit.h>
|
||||||
|
@ -150,8 +150,10 @@ int interactive_loop(int fd_in, int fd_out, char *file1, char *file2);
|
||||||
static void
|
static void
|
||||||
killchild(int signo)
|
killchild(int signo)
|
||||||
{
|
{
|
||||||
if (sshpid > 1)
|
if (sshpid > 1) {
|
||||||
kill(sshpid, SIGTERM);
|
kill(sshpid, SIGTERM);
|
||||||
|
waitpid(sshpid, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue