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

Commit cb132c07 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Remove dead code." am: 3bde05d9 am: 8e5fb5a0

am: a5a65785

Change-Id: I946b58688421f0836a454542bc74882679a93b54
parents 4c3de75a a5a65785
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -106,20 +106,6 @@

namespace {

void init_subproc_child()
{
    setsid();

    // Set OOM score adjustment to prevent killing
    int fd = adb_open("/proc/self/oom_score_adj", O_WRONLY | O_CLOEXEC);
    if (fd >= 0) {
        adb_write(fd, "0", 1);
        adb_close(fd);
    } else {
       D("adb: unable to update oom_score_adj");
    }
}

// Reads from |fd| until close or failure.
std::string ReadAll(int fd) {
    char buffer[512];
@@ -316,7 +302,7 @@ bool Subprocess::ForkAndExec(std::string* error) {

    if (pid_ == 0) {
        // Subprocess child.
        init_subproc_child();
        setsid();

        if (type_ == SubprocessType::kPty) {
            child_stdinout_sfd.reset(OpenPtyChildFd(pts_name, &child_error_sfd));