From: djm Date: Tue, 30 Apr 2024 06:16:55 +0000 (+0000) Subject: flush stdout after writing "sftp>" prompt when not using editline. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f7fc667897e8cb809872c45435d26dc3d409430e;p=openbsd flush stdout after writing "sftp>" prompt when not using editline. From Alpine Linux via GHPR480 --- diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 44b81a3a0ea..67b0fcfbf99 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/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 * @@ -2272,8 +2272,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");