diff -Naur a/vendor/magento/module-deploy/Process/Queue.php b/vendor/magento/module-deploy/Process/Queue.php
--- a/vendor/magento/module-deploy/Process/Queue.php
+++ b/vendor/magento/module-deploy/Process/Queue.php
@@ -291,12 +291,30 @@ class Queue
     {
         if ($this->isCanBeParalleled()) {
             if ($package->getState() === null) {
-                $pid = pcntl_waitpid($this->getPid($package), $status, WNOHANG);
-                if ($pid === $this->getPid($package)) {
+                $pid = $this->getPid($package);
+                if ($pid === null) {
+                    return false;
+                }
+                $result = pcntl_waitpid($pid, $status, WNOHANG);
+                if ($result === $pid) {
                     $package->setState(Package::STATE_COMPLETED);
+                    $exitStatus = pcntl_wexitstatus($status);
+                    $this->logger->info(
+                        "Exited: " . $package->getPath() . "(status: $exitStatus)",
+                        [
+                            'process' => $package->getPath(),
+                            'status' => $exitStatus,
+                        ]
+                    );
 
                     unset($this->inProgress[$package->getPath()]);
                     return pcntl_wexitstatus($status) === 0;
+                } elseif ($result === -1) {
+                    $errno = pcntl_errno();
+                    $strerror = pcntl_strerror($errno);
+                    throw new \RuntimeException(
+                        "Error encountered checking child process status (PID: $pid): $strerror (errno: $errno)"
+                    );
                 }
                 return false;
             }
@@ -333,11 +351,23 @@ class Queue
     public function __destruct()
     {
         foreach ($this->inProgress as $package) {
-            if (pcntl_waitpid($this->getPid($package), $status) === -1) {
+            $pid = $this->getPid($package);
+            $this->logger->info(
+                "Reaping child process: {$package->getPath()} (PID: $pid)",
+                [
+                    'process' => $package->getPath(),
+                    'pid' => $pid,
+                ]
+            );
+            // phpcs:ignore Magento2.Functions.DiscouragedFunction
+            if (pcntl_waitpid($pid, $status) === -1) {
+                $errno = pcntl_errno();
+                $strerror = pcntl_strerror($errno);
                 throw new \RuntimeException(
-                    'Error while waiting for package deployed: ' . $this->getPid($package) . '; Status: ' . $status
+                    "Error encountered waiting for child process (PID: $pid): $strerror (errno: $errno)"
                 );
             }
+
         }
     }
 }
