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

Commit fd9ee2e1 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Don't use LOG() in code that runs post-fork.

To prevent deadlocks.

Bug: 188393100
Test: N/A
Change-Id: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302
Merged-In: Icf7a04c8f9d244b7bdd94b2111f41ce489d39302
parent 10d57c6c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1379,10 +1379,12 @@ static SecondaryDexAccess check_secondary_dex_access(const std::string& dex_path
        return kSecondaryDexAccessReadOk;
        return kSecondaryDexAccessReadOk;
    } else {
    } else {
        if (errno == ENOENT) {
        if (errno == ENOENT) {
            LOG(INFO) << "Secondary dex does not exist: " <<  dex_path;
            async_safe_format_log(ANDROID_LOG_INFO, LOG_TAG,
                    "Secondary dex does not exist: %s", dex_path.c_str());
            return kSecondaryDexAccessDoesNotExist;
            return kSecondaryDexAccessDoesNotExist;
        } else {
        } else {
            PLOG(ERROR) << "Could not access secondary dex " << dex_path;
            async_safe_format_log(ANDROID_LOG_ERROR, LOG_TAG,
                    "Could not access secondary dex: %s (%d)", dex_path.c_str(), errno);
            return errno == EACCES
            return errno == EACCES
                ? kSecondaryDexAccessPermissionError
                ? kSecondaryDexAccessPermissionError
                : kSecondaryDexAccessIOError;
                : kSecondaryDexAccessIOError;