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

Commit fff28619 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am f4a7ac00: Merge "Move the Zygote off libcore.os and onto android.system."

* commit 'f4a7ac00':
  Move the Zygote off libcore.os and onto android.system.
parents 12928a07 f4a7ac00
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ package com.android.internal.os;


import dalvik.system.ZygoteHooks;
import libcore.io.ErrnoException;
import libcore.io.Libcore;
import android.system.ErrnoException;
import android.system.Os;

/** @hide */
public final class Zygote {
@@ -141,7 +141,7 @@ public final class Zygote {
    public static void execShell(String command) {
        String[] args = { "/system/bin/sh", "-c", command };
        try {
            Libcore.os.execv(args[0], args);
            Os.execv(args[0], args);
        } catch (ErrnoException e) {
            throw new RuntimeException(e);
        }
+3 −3
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import android.net.LocalSocket;
import android.os.Process;
import android.os.SELinux;
import android.os.SystemProperties;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
import dalvik.system.PathClassLoader;
import java.io.BufferedReader;
@@ -34,9 +36,7 @@ import java.io.InputStreamReader;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import libcore.io.ErrnoException;
import libcore.io.IoUtils;
import libcore.io.Libcore;

/**
 * A connection that can make spawn requests.
@@ -186,7 +186,7 @@ class ZygoteConnection {
            }

            if (parsedArgs.runtimeInit && parsedArgs.invokeWith != null) {
                FileDescriptor[] pipeFds = Libcore.os.pipe();
                FileDescriptor[] pipeFds = Os.pipe();
                childPipeFd = pipeFds[1];
                serverPipeFd = pipeFds[0];
                ZygoteInit.setCloseOnExec(serverPipeFd, true);
+3 −3
Original line number Diff line number Diff line
@@ -28,14 +28,14 @@ import android.os.Process;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.system.Os;
import android.system.OsConstants;
import android.util.EventLog;
import android.util.Log;

import dalvik.system.VMRuntime;

import libcore.io.IoUtils;
import libcore.io.Libcore;
import libcore.io.OsConstants;

import java.io.BufferedReader;
import java.io.FileDescriptor;
@@ -473,7 +473,7 @@ public class ZygoteInit {
        closeServerSocket();

        // set umask to 0077 so new files and directories will default to owner-only permissions.
        Libcore.os.umask(S_IRWXG | S_IRWXO);
        Os.umask(S_IRWXG | S_IRWXO);

        if (parsedArgs.niceName != null) {
            Process.setArgV0(parsedArgs.niceName);