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

Commit 9c65f4f5 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

am: 67e3e53d

Change-Id: I446b797e3f8cb9d4299509fb34b84f5b25336300
parents 467ecaff 67e3e53d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1018,7 +1018,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));