Merge "init: fix writepid wrong pid written in file(s)"
diff --git a/init/service.cpp b/init/service.cpp
index 0ddc484..bdecc32 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -416,7 +416,7 @@
             }
         }
 
-        std::string pid_str = StringPrintf("%d", pid);
+        std::string pid_str = StringPrintf("%d", getpid());
         for (const auto& file : writepid_files_) {
             if (!WriteStringToFile(pid_str, file)) {
                 ERROR("couldn't write %s to %s: %s\n",