Merge "installd: Wait indefinitely for the subprocess if pidfd_open fails." am: 29d5414928 am: 7a776b5f24 am: 884f98f1a1 am: efc8ecf6aa am: 1dc41b2d7e

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2148827

Change-Id: I7053269b66a1d2115cdad3477da7f21f1178a9a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp
index 45aeab6..4d9b710 100644
--- a/cmds/installd/utils.cpp
+++ b/cmds/installd/utils.cpp
@@ -1184,8 +1184,8 @@
 int wait_child_with_timeout(pid_t pid, int timeout_ms) {
     int pidfd = pidfd_open(pid, /*flags=*/0);
     if (pidfd < 0) {
-        PLOG(ERROR) << "pidfd_open failed for pid " << pid;
-        kill(pid, SIGKILL);
+        PLOG(ERROR) << "pidfd_open failed for pid " << pid
+                    << ", waiting for child process without timeout";
         return wait_child(pid);
     }