summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-06 12:46:44 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-06 12:46:44 +0100
commitf1fadb92179b68519b57680718e30a389a63d5e5 (patch)
tree375f6b84b0e2341f665e1d4b33a245220db32caa
parentbf39034d3fd3e4fe83fe80acf60977cbfe7d1c3d (diff)
downloadlibguestfs-f1fadb92179b68519b57680718e30a389a63d5e5.tar.gz
libguestfs-f1fadb92179b68519b57680718e30a389a63d5e5.tar.xz
libguestfs-f1fadb92179b68519b57680718e30a389a63d5e5.zip
guestfish: Always fflush stdout between commands.
-rw-r--r--fish/fish.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fish/fish.c b/fish/fish.c
index b905c553..25483a1c 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -732,8 +732,12 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd)
else
r = run_action (cmd, argc, argv);
+ /* Always flush stdout after every command, so that messages, results
+ * etc appear immediately.
+ */
+ fflush (stdout);
+
if (pipecmd) {
- fflush (stdout);
close (1);
dup2 (stdout_saved_fd, 1);
close (stdout_saved_fd);