~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcf3764
)
client/tripectl: Flush output after each line.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 3 Jan 2007 18:44:09 +0000
(18:44 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 3 Jan 2007 18:44:09 +0000
(18:44 +0000)
Otherwise script users can be left hanging for long periods of time.
client/tripectl.c
patch
|
blob
|
blame
|
history
diff --git
a/client/tripectl.c
b/client/tripectl.c
index
ea8aadf
..
50678df
100644
(file)
--- 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)