SCP: Flush stdout after writing command prompt
Possibly address problem discussed in #861
This commit is contained in:
parent
6a816001ef
commit
5b793198c6
1 changed files with 4 additions and 1 deletions
5
scp.c
5
scp.c
|
@ -9516,13 +9516,16 @@ if (prompt) { /* interactive? */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf ("%s", prompt); /* display prompt */
|
printf ("%s", prompt); /* display prompt */
|
||||||
|
fflush (stdout);
|
||||||
cptr = fgets (cptr, size, stream); /* get cmd line */
|
cptr = fgets (cptr, size, stream); /* get cmd line */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else cptr = fgets (cptr, size, stream); /* get cmd line */
|
else cptr = fgets (cptr, size, stream); /* get cmd line */
|
||||||
#else
|
#else
|
||||||
if (prompt) /* interactive? */
|
if (prompt) { /* interactive? */
|
||||||
printf ("%s", prompt); /* display prompt */
|
printf ("%s", prompt); /* display prompt */
|
||||||
|
fflush (stdout);
|
||||||
|
}
|
||||||
cptr = fgets (cptr, size, stream); /* get cmd line */
|
cptr = fgets (cptr, size, stream); /* get cmd line */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue