From: Mark Wooding Date: Wed, 3 Jan 2007 18:44:09 +0000 (+0000) Subject: client/tripectl: Flush output after each line. X-Git-Tag: 1.0.0pre8~91 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/5136c31e6364d9189b96ac5385f6add65ae39479?ds=inline client/tripectl: Flush output after each line. Otherwise script users can be left hanging for long periods of time. --- diff --git a/client/tripectl.c b/client/tripectl.c index ea8aadff..50678df9 100644 --- a/client/tripectl.c +++ b/client/tripectl.c @@ -163,6 +163,7 @@ static void cline(char *p, size_t len, void *b) } else if (strcmp(q, "INFO") == 0) { checkfg(); puts(p); + fflush(stdout); } else if (strcmp(q, "OK") == 0) { checkfg(); exit(0); @@ -176,6 +177,7 @@ static void cline(char *p, size_t len, void *b) } else if (strcmp(q, "BGINFO") == 0) { checkbg(&p); puts(p); + fflush(stdout); } else if (strcmp(q, "BGFAIL") == 0) { checkbg(&p); die(EXIT_FAILURE, "%s", p); @@ -191,6 +193,7 @@ static void sline(char *p, size_t len, void *b) exit(0); } puts(p); + fflush(stdout); } static void uline(char *p, size_t len, void *b)