Merge "Close statsd log socket before zygote fork()." am: b3d2890291
am: cdcf340421
Change-Id: I7e56dadb11ad2a0c4bd0ba55d918c3308ae8dc8a
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 06cd080..ad61538 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -230,6 +230,7 @@
"libseccomp_policy",
"libgrallocusage",
"libscrypt_static",
+ "libstatssocket",
],
shared_libs: [
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index da25801..6f400c4 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -56,6 +56,7 @@
#include <utils/String8.h>
#include <selinux/android.h>
#include <seccomp_policy.h>
+#include <stats_event_list.h>
#include <processgroup/processgroup.h>
#include "core_jni_helpers.h"
@@ -788,6 +789,7 @@
// Close any logging related FDs before we start evaluating the list of
// file descriptors.
__android_log_close();
+ stats_log_close();
std::string error_msg;