From 1cfb36112901eaf44110d8a29355c3116bee4a3a Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Sat, 17 Feb 2018 17:48:45 -0800 Subject: 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 --- roots.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roots.cpp') diff --git a/roots.cpp b/roots.cpp index e2d5d6543..9ff5186c1 100644 --- a/roots.cpp +++ b/roots.cpp @@ -189,7 +189,7 @@ static int exec_cmd(const std::vector& args) { argv.push_back(nullptr); pid_t child; - if ((child = vfork()) == 0) { + if ((child = fork()) == 0) { execv(argv[0], argv.data()); _exit(EXIT_FAILURE); } -- cgit v1.2.3