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

Commit a1823875 authored by Matt Delmage's avatar Matt Delmage Committed by Android (Google) Code Review
Browse files

Merge "Revert "Cancel dumpstate if client disconnects""

parents d7ce14f5 19486a2c
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -75,23 +75,6 @@ int main(int argc, char* argv[]) {
        return EXIT_FAILURE;
    }

    // Wait a little while for dumpstatez to stop if it is running
    bool dumpstate_running = false;
    for (int i = 0; i < 20; i++) {
        char buf[PROPERTY_VALUE_MAX];
        property_get("init.svc.dumpstatez", buf, "");
        dumpstate_running = strcmp(buf, "running") == 0;

        if (!dumpstate_running) break;

        sleep(1);
    }

    if (dumpstate_running) {
        fprintf(stderr, "FAIL:dumpstatez service is already running\n");
        return EXIT_FAILURE;
    }

    // TODO: code below was copy-and-pasted from bugreport.cpp (except by the
    // timeout value);
    // should be reused instead.
+1 −5
Original line number Diff line number Diff line
@@ -2602,11 +2602,7 @@ static void ShowUsage() {
}

static void register_sig_handler() {
    signal(SIGPIPE, [](int) {
        MYLOGE("Connection with client lost, canceling.");
        ds.Cancel();
        abort();
    });
    signal(SIGPIPE, SIG_IGN);
}

bool Dumpstate::FinishZipFile() {