From c5114a92a66eff373c0dad54736e48d77522fc25 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 3 Nov 2002 08:46:35 +0000 Subject: [PATCH] Half of Lars Gunnarsson's iXplorer compatibility patch: the PSFTP login prompt should be fflushed (presumably fgets fails to implicitly do this when stdin and stdout are redirected weirdly). [originally from svn r2186] --- psftp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/psftp.c b/psftp.c index e5857321..93fa33f6 100644 --- a/psftp.c +++ b/psftp.c @@ -1769,6 +1769,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber) } if (!cfg.username[0]) { printf("login as: "); + fflush(stdout); if (!fgets(cfg.username, sizeof(cfg.username), stdin)) { fprintf(stderr, "psftp: aborting\n"); cleanup_exit(1);