diff options
author | tjr <tjr@FreeBSD.org> | 2003-05-01 02:36:27 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-05-01 02:36:27 +0000 |
commit | ddbd6efafac8dddf586511da6b15194011d3edd0 (patch) | |
tree | 37cb7506bb24e3151423305af8246b7378b1ca30 /usr.bin/m4 | |
parent | d39162a421d8ef7acc51718e21c1b987cb529aeb (diff) | |
download | FreeBSD-src-ddbd6efafac8dddf586511da6b15194011d3edd0.zip FreeBSD-src-ddbd6efafac8dddf586511da6b15194011d3edd0.tar.gz |
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.
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/eval.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 37ccc35..6d2d0fde 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: |