---
find.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/find.c b/find.c
index ce551e5..71488da 100644
--- a/find.c
+++ b/find.c
@@ -244,6 +244,7 @@ spawn(char *argv[])
switch((pid = fork())) {
case -1:
eprintf("fork:");
+ return -1;
case 0:
execvp(*argv, argv);
weprintf("exec %s failed:", *argv);
@@ -252,7 +253,7 @@ spawn(char *argv[])
/* FIXME: proper course of action for waitpid() on EINTR? */
waitpid(pid, &status, 0);
- return status;
+ return WIFEXITED(status) && WEXITSTATUS(status) == 0 ? 0 : -1;
}
static int
--
2.48.1- [hackers] [sbase][PATCH 1/6] find: Fall back ... Tavian Barnes
- [hackers] [sbase][PATCH 5/6] libutil/mod... Tavian Barnes
- Re: [hackers] [sbase][PATCH 5/6] lib... Roberto E . Vargas Caballero
- Re: [hackers] [sbase][PATCH 5/6] lib... Michael Forney
- Re: [hackers] [sbase][PATCH 5/6]... Tavian Barnes
- [hackers] [sbase][PATCH 3/6] find: Fix s... Tavian Barnes
- Re: [hackers] [sbase][PATCH 3/6] fin... Evan Gates
- Re: [hackers] [sbase][PATCH 3/6]... Tavian Barnes
- Re: [hackers] [sbase][PATCH 3/6]... Roberto E . Vargas Caballero
- [hackers] [sbase][PATCH 4/6] find: Use t... Tavian Barnes
- Re: [hackers] [sbase][PATCH 4/6] fin... Roberto E . Vargas Caballero
- Re: [hackers] [sbase][PATCH 4/6] fin... Tavian Barnes
- Re: [hackers] [sbase][PATCH 4/6]... Roberto E. Vargas Caballero
- [hackers] [sbase][PATCH 2/6] find: Don't... Tavian Barnes
- Re: [hackers] [sbase][PATCH 2/6] fin... Roberto E . Vargas Caballero
- [hackers] [sbase][PATCH 6/6] find: Imple... Tavian Barnes
