]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: flush stdout after writing "sftp>" prompt when not using
authordjm@openbsd.org <djm@openbsd.org>
Tue, 30 Apr 2024 06:16:55 +0000 (06:16 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 30 Apr 2024 06:17:20 +0000 (16:17 +1000)
editline.

From Alpine Linux via GHPR480

OpenBSD-Commit-ID: 80bdc7ffe0358dc090eb9b93e6dedb2b087b24cd

sftp.c

diff --git a/sftp.c b/sftp.c
index 76ba4de373cb2af88186b72f23aeb21d84dd1b2b..c080fba5d496c39ebb01a8cfbaec44a9ddae6af1 100644 (file)
--- 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");