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>
This commit is contained in:
parent
3eb77f2c54
commit
e9f1a293f1
@ -239,6 +239,9 @@ f_exec(plan, entry)
|
|||||||
if (plan->flags == F_NEEDOK && !queryuser(plan->e_argv))
|
if (plan->flags == F_NEEDOK && !queryuser(plan->e_argv))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
/* make sure find output is interspersed correctly with subprocesses */
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
switch (pid = vfork()) {
|
switch (pid = vfork()) {
|
||||||
case -1:
|
case -1:
|
||||||
err(1, "fork");
|
err(1, "fork");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user