Mercurial > hg > toybox
comparison toys/pending/find.c @ 1327:85f297591693 draft
Introduce xfork() and make commands use it, and make some WEXITSTATUS() use WIFEXITED() and WTERMSIG()+127.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 31 May 2014 12:33:24 -0500 |
parents | c99c215b4604 |
children |
comparison
equal
deleted
inserted
replaced
1326:78a3eaf5555f | 1327:85f297591693 |
---|---|
92 int plen; | 92 int plen; |
93 path = dirtree_path(node, &plen); | 93 path = dirtree_path(node, &plen); |
94 arg_array[filter->data.e.arg_path_index] = path; | 94 arg_array[filter->data.e.arg_path_index] = path; |
95 } | 95 } |
96 | 96 |
97 if (!(pid = fork())) xexec(arg_array); | 97 if (!(pid = xfork())) xexec(arg_array); |
98 free(path); | 98 free(path); |
99 waitpid(pid, &status, 0); | 99 waitpid(pid, &status, 0); |
100 | 100 |
101 return !WEXITSTATUS(status); | 101 return !WEXITSTATUS(status); |
102 } | 102 } |