From: Ken Hornstein Date: Tue, 20 Mar 2012 23:52:29 +0000 (-0400) Subject: Use _exit() instead of exit() so our writer process doesn't flush out X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=878f39953d1d908e8c151e33ea14172ea10b7c4b;p=mmh Use _exit() instead of exit() so our writer process doesn't flush out the stdio buffers on exit. --- diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index ae1fb5d..0798746 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -2119,7 +2119,11 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp) */ close(fdinput[1]); - exit(0); + /* + * Make sure we call _exit(), otherwise we may flush out the stdio + * buffers that we have duplicated from the parent. + */ + _exit(0); break; case -1: adios(NULL, "Unable to fork for filter writer process");