Merge "Fix NativeCrashListener"

This commit is contained in:
Neil Fuller
2015-07-16 10:26:17 +00:00
committed by Gerrit Code Review

View File

@@ -123,11 +123,10 @@ final class NativeCrashListener extends Thread {
Os.listen(serverFd, 1); Os.listen(serverFd, 1);
while (true) { while (true) {
InetSocketAddress peer = new InetSocketAddress();
FileDescriptor peerFd = null; FileDescriptor peerFd = null;
try { try {
if (MORE_DEBUG) Slog.v(TAG, "Waiting for debuggerd connection"); if (MORE_DEBUG) Slog.v(TAG, "Waiting for debuggerd connection");
peerFd = Os.accept(serverFd, peer); peerFd = Os.accept(serverFd, null /* peerAddress */);
if (MORE_DEBUG) Slog.v(TAG, "Got debuggerd socket " + peerFd); if (MORE_DEBUG) Slog.v(TAG, "Got debuggerd socket " + peerFd);
if (peerFd != null) { if (peerFd != null) {
// Only the superuser is allowed to talk to us over this socket // Only the superuser is allowed to talk to us over this socket