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

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

dumpstate: use O_APPEND for anr file.

am: 989b812d

Change-Id: Ibaa04b99195886df0ff14b2f6569e37918373619
parents f79a82d6 989b812d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1021,7 +1021,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));