From 6c41e3a2c713b58bfce8fc6c0e32cea7d880f5e7 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Mon, 13 Dec 2004 20:20:48 +0000 Subject: [PATCH] Flush stdout and stderr before forking. --- src/compress.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compress.c b/src/compress.c index b76edb2f..ea98ce85 100644 --- a/src/compress.c +++ b/src/compress.c @@ -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"); -- 2.40.0