mirror of
https://github.com/electron/electron.git
synced 2026-01-27 16:28:23 -05:00
Simplify EnsureProcessTerminated() implementations.
https://chromium-review.googlesource.com/c/chromium/src/+/920799
This commit is contained in:
committed by
Aleksei Kuzmin
parent
8da2bd43b8
commit
9264a00dfd
@@ -32,16 +32,15 @@ bool XDGUtilV(const std::vector<std::string>& argv, const bool wait_for_exit) {
|
||||
if (!process.IsValid())
|
||||
return false;
|
||||
|
||||
if (!wait_for_exit) {
|
||||
base::EnsureProcessGetsReaped(process.Pid());
|
||||
return true;
|
||||
if (wait_for_exit) {
|
||||
int exit_code = -1;
|
||||
if (!process.WaitForExit(&exit_code))
|
||||
return false;
|
||||
return (exit_code == 0);
|
||||
}
|
||||
|
||||
int exit_code = -1;
|
||||
if (!process.WaitForExit(&exit_code))
|
||||
return false;
|
||||
|
||||
return (exit_code == 0);
|
||||
base::EnsureProcessGetsReaped(std::move(process));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XDGUtil(const std::string& util,
|
||||
|
||||
Reference in New Issue
Block a user