Skip to content

Commit

Permalink
#22607 static-test-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed May 16, 2019
1 parent 8d0a3d8 commit 2be3105
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/code/Magento/Deploy/Process/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ private function isDeployed(Package $package)
$result = pcntl_waitpid($pid, $status, WNOHANG);
if ($result === $pid) {
$package->setState(Package::STATE_COMPLETED);
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$exitStatus = pcntl_wexitstatus($status);

$this->logger->info(
Expand All @@ -361,7 +362,9 @@ private function isDeployed(Package $package)
// phpcs:ignore Magento2.Functions.DiscouragedFunction
return pcntl_wexitstatus($status) === 0;
} elseif ($result === -1) {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$errno = pcntl_errno();
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$strerror = pcntl_strerror($errno);

throw new \RuntimeException(
Expand Down Expand Up @@ -401,6 +404,7 @@ private function checkTimeout()
* Protect against zombie process
*
* @throws \RuntimeException
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
* @return void
*/
public function __destruct()
Expand All @@ -417,7 +421,9 @@ public function __destruct()

// phpcs:ignore Magento2.Functions.DiscouragedFunction
if (pcntl_waitpid($pid, $status) === -1) {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$errno = pcntl_errno();
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$strerror = pcntl_strerror($errno);

throw new \RuntimeException(
Expand Down

0 comments on commit 2be3105

Please sign in to comment.