diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-05-13 01:25:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-05-13 01:25:36 +0000 |
commit | 28765c6184afb2c89fba3957172a3ae27c9cc035 (patch) | |
tree | 810bf58a135c8a897d3417e183282e092d0c690a | |
parent | d4f5bb4c17e617ff39085e4a7fdd96e96b3c62ad (diff) | |
parent | 61fb7bcecb6297d802dcb56d12bf107fa200640d (diff) | |
download | native-28765c6184afb2c89fba3957172a3ae27c9cc035.tar.gz |
Merge "Actually remove dead processes from lshal"
-rw-r--r-- | cmds/lshal/ListCommand.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp index fe2a7ca5c1..710b6e4c84 100644 --- a/cmds/lshal/ListCommand.cpp +++ b/cmds/lshal/ListCommand.cpp @@ -68,9 +68,9 @@ const std::string &ListCommand::getCmdline(pid_t pid) { void ListCommand::removeDeadProcesses(Pids *pids) { static const pid_t myPid = getpid(); - std::remove_if(pids->begin(), pids->end(), [this](auto pid) { + pids->erase(std::remove_if(pids->begin(), pids->end(), [this](auto pid) { return pid == myPid || this->getCmdline(pid).empty(); - }); + }), pids->end()); } bool ListCommand::getReferencedPids( |