mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2025-02-17 05:20:39 +00:00
blkid 进程残留
Signed-off-by: s30051537 <sunxiaoqiang7@huawei.com>
This commit is contained in:
parent
842cd70695
commit
03743b8595
@ -439,7 +439,7 @@ int ForkExec(std::vector<std::string> &cmd, std::vector<std::string> *output)
|
||||
(void)close(pipe_fd[1]);
|
||||
execvp(args[0], const_cast<char **>(args.data()));
|
||||
LOGE("execvp failed errno: %{public}d", errno);
|
||||
exit(0);
|
||||
exit(1);
|
||||
} else {
|
||||
(void)close(pipe_fd[1]);
|
||||
if (output) {
|
||||
@ -450,12 +450,10 @@ int ForkExec(std::vector<std::string> &cmd, std::vector<std::string> *output)
|
||||
LOGI("get result %{public}s", buf);
|
||||
output->push_back(buf);
|
||||
}
|
||||
(void)close(pipe_fd[0]);
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
waitpid(pid, &status, 0);
|
||||
(void)close(pipe_fd[0]);
|
||||
waitpid(pid, &status, 0);
|
||||
if (errno == ECHILD) {
|
||||
return E_NO_CHILD;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user