diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-06-29 10:47:42 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-06-29 10:47:42 +0200 |
| commit | 7b45fa115b57d0a6424c369483b320acfe6a1de7 (patch) | |
| tree | fbc8b30b977926c3345509358bfdc76eaa2ca495 /executor/executor_linux.cc | |
| parent | 1a3c2436df1f7c9c0271aad092558d943a0ee19e (diff) | |
pkg/csource: support fuchsia
Lots of assorted heavylifting to support csource on fuchsia.
Diffstat (limited to 'executor/executor_linux.cc')
| -rw-r--r-- | executor/executor_linux.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/executor/executor_linux.cc b/executor/executor_linux.cc index 33474b75f..f2a21343a 100644 --- a/executor/executor_linux.cc +++ b/executor/executor_linux.cc @@ -76,27 +76,20 @@ int main(int argc, char** argv) install_segv_handler(); use_temporary_dir(); - int pid = -1; + int status = 0; switch (flag_sandbox) { case sandbox_none: - pid = do_sandbox_none(); + status = do_sandbox_none(); break; case sandbox_setuid: - pid = do_sandbox_setuid(); + status = do_sandbox_setuid(); break; case sandbox_namespace: - pid = do_sandbox_namespace(); + status = do_sandbox_namespace(); break; default: fail("unknown sandbox type"); } - if (pid < 0) - fail("clone failed"); - debug("spawned loop pid %d\n", pid); - int status = 0; - while (waitpid(-1, &status, __WALL) != pid) { - } - status = WEXITSTATUS(status); // Other statuses happen when fuzzer processes manages to kill loop. if (status != kFailStatus && status != kErrorStatus) status = kRetryStatus; |
