编码规范修改禁止使用exit函数

Signed-off-by: liduo <liduo29@huawei.com>
This commit is contained in:
liduo
2025-07-02 21:43:25 +08:00
parent 7b854f65da
commit 95eef05279
2 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -635,8 +635,8 @@ std::string ExecuteCommand(const std::string &cmd)
argv[i] = nullptr;
execvp(argv[0], argv);
// if execvp returns, there was an error.
perror("execle failed");
exit(EXIT_FAILURE);
perror("execvp failed");
throw std::runtime_error("execvp failed");
} else {
// parent process
// close unused write end