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

Commit 3588c912 authored by Theodore Dubois's avatar Theodore Dubois
Browse files

Log the errno if calling fork() fails

Test: treehugger
Change-Id: I9d54e3c2c006aaa54a5bc044e39ab5d5e2ff7484
parent 97f0cbd9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2127,6 +2127,8 @@ pid_t zygote::ForkCommon(JNIEnv* env, bool is_system_server,

    // Reset the fd to the unsolicited zygote socket
    gSystemServerSocketFd = -1;
  } else if (pid == -1) {
    ALOGE("Failed to fork child process: %s (%d)", strerror(errno), errno);
  } else {
    ALOGD("Forked child process %d", pid);
  }