Fix using /usr/bin/ftp as a slave process on the end of a pipe by calling

fflush(stdout).  This is one ancient PR...

PR:		bin/1589
Submitted by:	imp
This commit is contained in:
jon 2001-08-05 08:39:58 +00:00
parent 35fde3d8db
commit ae427e14bb
2 changed files with 3 additions and 3 deletions

View File

@ -375,10 +375,9 @@ cmdscanner(top)
#ifndef SMALL
if (!editing) {
#endif /* !SMALL */
if (fromatty) {
if (fromatty)
fputs(prompt(), stdout);
(void)fflush(stdout);
}
(void)fflush(stdout);
if (fgets(line, sizeof(line), stdin) == NULL)
quit(0, 0);
num = strlen(line);

View File

@ -251,6 +251,7 @@ login(host, user, pass)
printf("Name (%s:%s): ", host, myname);
else
printf("Name (%s): ", host);
(void)fflush(stdout);
if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL)
return (0);
tmp[strlen(tmp) - 1] = '\0';