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

Commit 30d75e60 authored by Neil Fuller's avatar Neil Fuller Committed by Android Git Automerger
Browse files

am c83d1819: Merge "Switch from InetUnixAddress to UnixSocketAddress"

* commit 'c83d1819':
  Switch from InetUnixAddress to UnixSocketAddress
parents 7b12deb5 c83d1819
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.system.ErrnoException;
import android.system.Os;
import android.system.StructTimeval;
import android.system.StructUcred;
import android.system.UnixSocketAddress;
import android.util.Slog;

import static android.system.OsConstants.*;
@@ -30,7 +31,6 @@ import java.io.File;
import java.io.FileDescriptor;
import java.io.InterruptedIOException;
import java.net.InetSocketAddress;
import java.net.InetUnixAddress;

/**
 * Set up a Unix domain socket that debuggerd will connect() to in
@@ -117,8 +117,9 @@ final class NativeCrashListener extends Thread {

        try {
            FileDescriptor serverFd = Os.socket(AF_UNIX, SOCK_STREAM, 0);
            final InetUnixAddress sockAddr = new InetUnixAddress(DEBUGGERD_SOCKET_PATH);
            Os.bind(serverFd, sockAddr, 0);
            final UnixSocketAddress sockAddr = UnixSocketAddress.createFileSystem(
                    DEBUGGERD_SOCKET_PATH);
            Os.bind(serverFd, sockAddr);
            Os.listen(serverFd, 1);

            while (true) {