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

Commit 67e3e53d authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

dumpstate: use O_APPEND for anr file. am: 989b812d

am: b0f08f67

Change-Id: Ic0fb8b7a328edcaa62c725d84aea74d9404e6ee9
parents 27cdfc3e b0f08f67
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1019,7 +1019,9 @@ const char *dump_traces() {
    }

    /* create a new, empty traces.txt file to receive stack dumps */
    int fd = TEMP_FAILURE_RETRY(open(traces_path, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW | O_CLOEXEC,
    int fd = TEMP_FAILURE_RETRY(
        open(traces_path,
             O_CREAT | O_WRONLY | O_APPEND | O_TRUNC | O_NOFOLLOW | O_CLOEXEC,
             0666)); /* -rw-rw-rw- */
    if (fd < 0) {
        MYLOGE("%s: %s\n", traces_path, strerror(errno));