diff options
author | nate <nate@FreeBSD.org> | 1995-09-12 23:15:33 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1995-09-12 23:15:33 +0000 |
commit | ceb4b5097101339e2b70f809790947544f27ec45 (patch) | |
tree | 740f444185973f71e4299721fd204e3e1bdeea67 /usr.bin/find | |
parent | 05ba62283064c2394339fa3975fe9a4da67c12a9 (diff) | |
download | FreeBSD-src-ceb4b5097101339e2b70f809790947544f27ec45.zip FreeBSD-src-ceb4b5097101339e2b70f809790947544f27ec45.tar.gz |
Simpler fix to the find bug reported by Terry Lambert <terry@lambert.org>
[ Find to a file vs. to stdout ] produces different output because find
does not flush stdout when doing a -print.
Submitted by: Jeffrey Hsu <hsu@freefall.freebsd.org>
Diffstat (limited to 'usr.bin/find')
-rw-r--r-- | usr.bin/find/function.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index 6bd85b5..c316b9d 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -239,6 +239,9 @@ f_exec(plan, entry) if (plan->flags == F_NEEDOK && !queryuser(plan->e_argv)) return (0); + /* make sure find output is interspersed correctly with subprocesses */ + fflush(stdout); + switch (pid = vfork()) { case -1: err(1, "fork"); |