X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=25483a1cd73360fbbf2a90100407790db1d8afd0;hb=64c565dc905cef89a681c0bd9dce0864f3b03797;hp=59348c3be7fecf2c810c9bffb1d58af0cd30f4fd;hpb=8863ecde5dba262c0736da7505a9fa3655ed42f6;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 59348c3..25483a1 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1,5 +1,5 @@ /* guestfish - the filesystem interactive shell - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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);