diff --git a/init/sigchld_handler.cpp b/init/sigchld_handler.cpp index 6fc64df33..6a6050b2a 100644 --- a/init/sigchld_handler.cpp +++ b/init/sigchld_handler.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -36,6 +37,7 @@ using android::base::boot_clock; using android::base::make_scope_guard; +using android::base::ReadFileToString; using android::base::StringPrintf; using android::base::Timer; @@ -132,6 +134,11 @@ void WaitToBeReaped(const std::vector& pids, std::chrono::milliseconds ti } LOG(INFO) << "Waiting for " << pids.size() << " pids to be reaped took " << t << " with " << alive_pids.size() << " of them still running"; + for (pid_t pid : pids) { + std::string status = "(no-such-pid)"; + ReadFileToString(StringPrintf("/proc/%d/status", pid), &status); + LOG(INFO) << "Still running: " << pid << ' ' << status; + } } } // namespace init