diff options
-rw-r--r-- | client/client.c | 4 | ||||
-rw-r--r-- | sysdep/unix/main.c | 6 |
2 files changed, 8 insertions, 2 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 diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index e16eb69..75852c1 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -183,10 +183,12 @@ cli_write(cli *c) if (c->tx_pos) { struct cli_out *o = c->tx_pos; - c->tx_pos = o->next; s->tbuf = o->outpos; if (sk_send(s, o->wpos - o->outpos) > 0) - ev_schedule(c->event); + { + c->tx_pos = o->next; + ev_schedule(c->event); + } } return !c->tx_pos; } |