]> granicus.if.org Git - file/commitdiff
Flush stdout and stderr before forking.
authorChristos Zoulas <christos@zoulas.com>
Mon, 13 Dec 2004 20:20:48 +0000 (20:20 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 13 Dec 2004 20:20:48 +0000 (20:20 +0000)
src/compress.c

index b76edb2f117e9805a1481e52e33fd4f53de39191..ea98ce851232c43b54eb5d8b59a62654b2174f15 100644 (file)
@@ -50,7 +50,7 @@
 #endif
 
 #ifndef lint
-FILE_RCSID("@(#)$Id: compress.c,v 1.38 2004/09/11 19:15:57 christos Exp $")
+FILE_RCSID("@(#)$Id: compress.c,v 1.39 2004/12/13 20:20:48 christos Exp $")
 #endif
 
 
@@ -321,6 +321,8 @@ uncompressbuf(struct magic_set *ms, size_t method, const unsigned char *old,
        if (method == 2)
                return uncompressgzipped(ms, old, newch, n);
 #endif
+       (void)fflush(stdout);
+       (void)fflush(stderr);
 
        if (pipe(fdin) == -1 || pipe(fdout) == -1) {
                file_error(ms, errno, "cannot create pipe");