Replace vfork() with fork().
The static analyzer complained about the function calls we were doing
here to vector::data() and vector::operator[]:
bootable/recovery/roots.cpp:193:11: warning: This function call is
prohibited after a successful vfork
Since it's not clear that vfork() is needed here, just use fork()
instead.
Bug: None
Test: Reran the static analyzer with only this patch applied. Bug
disappeared
Change-Id: I580f8243a21899f1e1678c8aee6948dfa7f69a1d
diff --git a/roots.cpp b/roots.cpp
index e2d5d65..9ff5186 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -189,7 +189,7 @@
argv.push_back(nullptr);
pid_t child;
- if ((child = vfork()) == 0) {
+ if ((child = fork()) == 0) {
execv(argv[0], argv.data());
_exit(EXIT_FAILURE);
}