diff options
author | Martin Mares <mj@ucw.cz> | 2004-05-31 19:55:30 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2004-05-31 19:55:30 +0200 |
commit | 5f2a6a9ff324d846c86ffafb60ae5a4c01d06313 (patch) | |
tree | 36be871d290f918f9ae79a22b583069626277f2c /client/client.c | |
parent | a4ffe2739d1a3efb45f209b63b2b6faa558e43a9 (diff) | |
download | bird-5f2a6a9ff324d846c86ffafb60ae5a4c01d06313.tar bird-5f2a6a9ff324d846c86ffafb60ae5a4c01d06313.zip |
Fix handling on full pipe to client in bird. Prevent packet overflows
for even only medium sized route table output. Fix a strange garbled
output problem in the client. The latter seems to be caused by some
library doing tcflush while there is still command output pending. So
the best fix here is to do fflush and then tcdrain. Note that this
problem occurs only under certain load situations and is not too easy to
reproduce.
(by Andreas)
Diffstat (limited to 'client/client.c')
-rw-r--r-- | client/client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/client.c b/client/client.c index f1c73c4..836941f 100644 --- a/client/client.c +++ b/client/client.c @@ -281,6 +281,10 @@ server_got_reply(char *x) } else printf("??? <%s>\n", x); + /* need this, otherwise some lib seems to eat pending output when + the prompt is displayed */ + fflush(stdout); + tcdrain(fileno(stdout)); } static void |