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:
Jonathan Chen 2001-08-05 08:39:58 +00:00
parent 3d04a9d7e3
commit 48aa92042e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81155
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';