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

Commit 78563fdf authored by Matthew Bouyack's avatar Matthew Bouyack Committed by android-build-merger
Browse files

DO NOT MERGE Fail gracefully when we fail to fork the update binary

am: de1b53d0

Change-Id: Ic7a42220ed7e842dad1d5d2aacdd12253bd5ad84
parents cc94f814 de1b53d0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -369,6 +369,14 @@ try_update_binary(const char* path, ZipArchive* zip, bool* wipe_cache,
    }

    pid_t pid = fork();

    if (pid == -1) {
        close(pipefd[0]);
        close(pipefd[1]);
        LOGE("Failed to fork update binary: %s\n", strerror(errno));
        return INSTALL_ERROR;
    }

    if (pid == 0) {
        umask(022);
        close(pipefd[0]);