OSDN Git Service

Merge "Preventing zombie process creation." into pi-dev am: ca6f36532d
authorandroid-build-team Robot <android-build-team-robot@google.com>
Thu, 3 May 2018 01:05:11 +0000 (18:05 -0700)
committerandroid-build-merger <android-build-merger@google.com>
Thu, 3 May 2018 01:05:11 +0000 (18:05 -0700)
am: 193c893b01

Change-Id: Id32203ab069343410a02c03956a7c6135f8a1b33

1  2 
cmds/incidentd/src/Section.cpp

@@@ -864,8 -902,10 +864,10 @@@ status_t TombstoneSection::BlockingCall
          // Read from the pipe concurrently to avoid blocking the child.
          FdBuffer buffer;
          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) {
 -            ALOGW("TombstoneSection '%s' failed to read stack dump: %d", this->name.string(), err);
 +            ALOGW("[%s] failed to read stack dump: %d", this->name.string(), err);
              dumpPipe.readFd().reset();
              break;
          }