public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
302b78f
)
ssh: fflush the shell prompt
author
Alan Cox
<alan@linux.intel.com>
Sun, 7 Dec 2014 14:29:24 +0000
(14:29 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Sun, 7 Dec 2014 14:29:24 +0000
(14:29 +0000)
From: Will Sowerbutts <will@sowerbutts.com>
The assumption that libc will fflush stdout on an fgets of stdin is not anything
the standards guarantee. Do the needed fflush
Applications/util/ssh.c
patch
|
blob
|
history
diff --git
a/Applications/util/ssh.c
b/Applications/util/ssh.c
index
6399ac7
..
aad1008
100644
(file)
--- a/
Applications/util/ssh.c
+++ b/
Applications/util/ssh.c
@@
-51,6
+51,7
@@
main(int argc, char *argval[])
for (i = 0; i < MAX_ARGS; i++) arg[i][0] = (char) 0;
do {
printf("ssh%c ", cprompt);
+ fflush(stdout);
fgets(buf, 127, stdin);
if (feof(stdin)) return 0; /* user typed ^D ? */
buf[strlen(buf) - 1] = '\0'; /* Strip newline from fgets */