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:
parent
3d04a9d7e3
commit
48aa92042e
@ -375,10 +375,9 @@ cmdscanner(top)
|
|||||||
#ifndef SMALL
|
#ifndef SMALL
|
||||||
if (!editing) {
|
if (!editing) {
|
||||||
#endif /* !SMALL */
|
#endif /* !SMALL */
|
||||||
if (fromatty) {
|
if (fromatty)
|
||||||
fputs(prompt(), stdout);
|
fputs(prompt(), stdout);
|
||||||
(void)fflush(stdout);
|
(void)fflush(stdout);
|
||||||
}
|
|
||||||
if (fgets(line, sizeof(line), stdin) == NULL)
|
if (fgets(line, sizeof(line), stdin) == NULL)
|
||||||
quit(0, 0);
|
quit(0, 0);
|
||||||
num = strlen(line);
|
num = strlen(line);
|
||||||
|
@ -251,6 +251,7 @@ login(host, user, pass)
|
|||||||
printf("Name (%s:%s): ", host, myname);
|
printf("Name (%s:%s): ", host, myname);
|
||||||
else
|
else
|
||||||
printf("Name (%s): ", host);
|
printf("Name (%s): ", host);
|
||||||
|
(void)fflush(stdout);
|
||||||
if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL)
|
if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL)
|
||||||
return (0);
|
return (0);
|
||||||
tmp[strlen(tmp) - 1] = '\0';
|
tmp[strlen(tmp) - 1] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user