summaryrefslogtreecommitdiffstats
path: root/usr.bin/find/find.c
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2006-05-14 20:23:01 +0000
committerkrion <krion@FreeBSD.org>2006-05-14 20:23:01 +0000
commit1076011263cd5794f112caf825f49bdf11027532 (patch)
tree349cde92880cada6ae50eb2f1d12fbfd74df1464 /usr.bin/find/find.c
parente2f88f3971f0d26f104b1b97f27675f57c6182b9 (diff)
downloadFreeBSD-src-1076011263cd5794f112caf825f49bdf11027532.zip
FreeBSD-src-1076011263cd5794f112caf825f49bdf11027532.tar.gz
The last execution of -exec {} + is not done if the -exec primary is
not on the top-level -and sequence, e.g. inside of ! or -or. Create a separate linked list of all active -exec {} + primaries and do the last execution for all at termination. PR: bin/79263 Submitted by: Jilles Tjoelker <jilles@stack.nl> MFC after: 7 days
Diffstat (limited to 'usr.bin/find/find.c')
-rw-r--r--usr.bin/find/find.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c
index 0486e8b..cc2d797 100644
--- a/usr.bin/find/find.c
+++ b/usr.bin/find/find.c
@@ -231,10 +231,7 @@ find_execute(PLAN *plan, char *paths[])
*/
for (p = plan; p && (p->execute)(p, entry); p = p->next);
}
- /* Finish any pending -exec ... {} + functions. */
- for (p = plan; p != NULL; p = p->next)
- if (p->execute == f_exec && p->flags & F_EXECPLUS)
- (p->execute)(p, NULL);
+ finish_execplus();
if (errno)
err(1, "fts_read");
return (rval);
OpenPOWER on IntegriCloud