Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b9dde09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix a lambda capture problem in TextDumpsysSection" into rvc-dev am:...

Merge "Fix a lambda capture problem in TextDumpsysSection" into rvc-dev am: 35a18b50 am: ddcab6fd am: e1491455 am: 594cda85

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11756603

Change-Id: I273b1c491e2a3d957b41b74f3036e0c58cc0aaf5
parents 656d44c4 594cda85
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -476,14 +476,15 @@ status_t TextDumpsysSection::Execute(ReportWriter* writer) const {

    // Run dumping thread
    const uint64_t start = Nanotime();
    std::thread worker([&]() {
    std::thread worker([write_fd = std::move(dumpPipe.writeFd()), service = std::move(service),
                        this]() mutable {
        // Don't crash the service if writing to a closed pipe (may happen if dumping times out)
        signal(SIGPIPE, sigpipe_handler);
        status_t err = service->dump(dumpPipe.writeFd().get(), mArgs);
        status_t err = service->dump(write_fd.get(), this->mArgs);
        if (err != OK) {
            ALOGW("[%s] dump thread failed. Error: %s", this->name.string(), strerror(-err));
        }
        dumpPipe.writeFd().reset();
        write_fd.reset();
    });

    // Collect dump content