From 878f39953d1d908e8c151e33ea14172ea10b7c4b Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Tue, 20 Mar 2012 19:52:29 -0400 Subject: [PATCH] Use _exit() instead of exit() so our writer process doesn't flush out the stdio buffers on exit. --- uip/mhlsbr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"); -- 1.7.10.4