summaryrefslogtreecommitdiffstats
path: root/sftp.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2024-04-30 08:16:55 +0200
committerDamien Miller <djm@mindrot.org>2024-04-30 08:17:20 +0200
commit14e2b16bc67ffcc188906f65008667e22f73d103 (patch)
tree5c81a4b7989f654135cd7c413dae58881008e93f /sftp.c
parentupstream: stricter validation of messaging socket fd number; disallow (diff)
downloadopenssh-14e2b16bc67ffcc188906f65008667e22f73d103.tar.xz
openssh-14e2b16bc67ffcc188906f65008667e22f73d103.zip
upstream: flush stdout after writing "sftp>" prompt when not using
editline. From Alpine Linux via GHPR480 OpenBSD-Commit-ID: 80bdc7ffe0358dc090eb9b93e6dedb2b087b24cd
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sftp.c b/sftp.c
index 76ba4de37..c080fba5d 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.238 2024/04/30 06:16:55 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -2301,8 +2301,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");