From 8f6c79240dc7c1e0b819a1a1309240477d8e0d84 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 23 Dec 2006 00:49:10 +0000 Subject: find: fix spurious -exec error messages (bug reported by Bernhard Fischer ) --- findutils/find.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'findutils') diff --git a/findutils/find.c b/findutils/find.c index bf6b71a..38bbfbe 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -197,9 +197,8 @@ ACTF(exec) for (i = 0; i < ap->exec_argc; i++) argv[i] = subst(ap->exec_argv[i], ap->subst_count[i], fileName); argv[i] = NULL; /* terminate the list */ - errno = 0; rc = wait4pid(spawn(argv)); - if (errno) + if (rc) bb_perror_msg("%s", argv[0]); for (i = 0; i < ap->exec_argc; i++) free(argv[i]); -- cgit v1.1