From aef4bb33e578207f8f61d34e20181a19088e32ac Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Thu, 1 May 2003 02:36:27 +0000 Subject: [PATCH] Flush streams before calling system() so that the output appears in the right place in the output stream when redirected to a file (when full buffering is enabled). Noticed by schweikh on freebsd-standards. --- usr.bin/m4/eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 37ccc35c529..6d2d0fdefc5 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -241,8 +241,10 @@ expand_builtin(const char *argv[], int argc, int td) /* * dosys - execute system command */ - if (argc > 2) + if (argc > 2) { + fflush(NULL); sysval = system(argv[2]); + } break; case SYSVTYPE: