Implement Zygote_nativeForkSystemServer

Change-Id: I2f0c7b93e8ac3b3fa4bb350e787065f92c17972f
diff --git a/src/runtime.cc b/src/runtime.cc
index a707c4d..4f74c67 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -359,9 +359,7 @@
   // come after ClassLinker::RunRootClinits.
   started_ = true;
 
-  if (!is_zygote_) {
-    signal_catcher_ = new SignalCatcher;
-  }
+  StartSignalCatcher();
 
   StartDaemonThreads();
 
@@ -374,6 +372,18 @@
   }
 }
 
+void Runtime::DidForkFromZygote() {
+  CHECK(is_zygote_);
+  is_zygote_ = false;
+  StartSignalCatcher();
+}
+
+void Runtime::StartSignalCatcher() {
+  if (!is_zygote_) {
+    signal_catcher_ = new SignalCatcher;
+  }
+}
+
 void Runtime::StartDaemonThreads() {
   if (IsVerboseStartup()) {
     LOG(INFO) << "Runtime::StartDaemonThreads entering";