Merge "Preventing zombie process creation." into pi-dev
am: ca6f36532d
Change-Id: Ie0c1ea1d658f719262f3e7473046a732915d7284
This commit is contained in:
committed by
android-build-merger
commit
193c893b01
@@ -902,11 +902,16 @@ status_t TombstoneSection::BlockingCall(int pipeWriteFd) const {
|
|||||||
// Read from the pipe concurrently to avoid blocking the child.
|
// Read from the pipe concurrently to avoid blocking the child.
|
||||||
FdBuffer buffer;
|
FdBuffer buffer;
|
||||||
err = buffer.readFully(dumpPipe.readFd().get());
|
err = buffer.readFully(dumpPipe.readFd().get());
|
||||||
|
// Wait on the child to avoid it becoming a zombie process.
|
||||||
|
status_t cStatus = wait_child(child);
|
||||||
if (err != NO_ERROR) {
|
if (err != NO_ERROR) {
|
||||||
ALOGW("TombstoneSection '%s' failed to read stack dump: %d", this->name.string(), err);
|
ALOGW("TombstoneSection '%s' failed to read stack dump: %d", this->name.string(), err);
|
||||||
dumpPipe.readFd().reset();
|
dumpPipe.readFd().reset();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (cStatus != NO_ERROR) {
|
||||||
|
ALOGE("TombstoneSection '%s' child had an issue: %s\n", this->name.string(), strerror(-cStatus));
|
||||||
|
}
|
||||||
|
|
||||||
auto dump = std::make_unique<char[]>(buffer.size());
|
auto dump = std::make_unique<char[]>(buffer.size());
|
||||||
auto iterator = buffer.data();
|
auto iterator = buffer.data();
|
||||||
|
|||||||
Reference in New Issue
Block a user