installd: Wait indefinitely for the subprocess if pidfd_open fails.

In Android T we introduced a feature in installd, which is to kill the
subprocess that times out. This feature is implemented by a syscall
pidfd_open, which requires kernel 5.4 or above, so it fails on older
kernels, and therefore causes installd unable to invoke dex2oat, etc.,
making the device unable to do any app compilation.

After this change, if pidfd_open fails, installd will wait indefinitely
for the subprocess, which is the behavior in Android S.

Bug: 238611524
Test: Presubmit
Change-Id: I12e492937b876b5b312b3f8eedce6e5d5d2a4a4e
Merged-In: I12e492937b876b5b312b3f8eedce6e5d5d2a4a4e
(cherry picked from commit 501af5a844821ef2ad3f89906893640c18ba848c)
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);
     }