Skip to content

Commit

Permalink
upstream: flush stdout after writing "sftp>" prompt when not using
Browse files Browse the repository at this point in the history
editline.

From Alpine Linux via GHPR480

OpenBSD-Commit-ID: 80bdc7ffe0358dc090eb9b93e6dedb2b087b24cd
  • Loading branch information
djmdjm committed Apr 30, 2024
1 parent 2e69a72 commit 14e2b16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sftp.c
Original file line number Diff line number Diff line change
@@ -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>
*
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 14e2b16

Please sign in to comment.