summaryrefslogtreecommitdiffstats
path: root/sftp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:43:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:43:00 +0000
commitc7042a16e2e4aac1030d8785c2c874d6a309b06a (patch)
tree5cc2a7944ee7d0073ecb2ae03b28fdbc4630a484 /sftp.c
parentAdding upstream version 1:9.7p1. (diff)
downloadopenssh-c7042a16e2e4aac1030d8785c2c874d6a309b06a.tar.xz
openssh-c7042a16e2e4aac1030d8785c2c874d6a309b06a.zip
Adding upstream version 1:9.8p1.upstream/1%9.8p1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sftp.c b/sftp.c
index 76ba4de..360c500 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.237 2024/02/01 02:37:33 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.239 2024/06/26 23:14:14 deraadt Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -234,12 +234,14 @@ killchild(int signo)
static void
suspchild(int signo)
{
+ int save_errno = errno;
if (sshpid > 1) {
kill(sshpid, signo);
while (waitpid(sshpid, NULL, WUNTRACED) == -1 && errno == EINTR)
continue;
}
kill(getpid(), SIGSTOP);
+ errno = save_errno;
}
static void
@@ -2301,8 +2303,10 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
break;
}
if (el == NULL) {
- if (interactive)
+ if (interactive) {
printf("sftp> ");
+ fflush(stdout);
+ }
if (fgets(cmd, sizeof(cmd), infile) == NULL) {
if (interactive)
printf("\n");