@@ -274,6 +274,7 @@ private function isCanBeParalleled()
274
274
*
275
275
* @param Package $package
276
276
* @return bool true on success for main process and exit for child process
277
+ * @SuppressWarnings(PHPMD.ExitExpression)
277
278
* @throws \RuntimeException
278
279
*/
279
280
private function execute (Package $ package )
@@ -347,6 +348,7 @@ private function isDeployed(Package $package)
347
348
$ result = pcntl_waitpid ($ pid , $ status , WNOHANG );
348
349
if ($ result === $ pid ) {
349
350
$ package ->setState (Package::STATE_COMPLETED );
351
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
350
352
$ exitStatus = pcntl_wexitstatus ($ status );
351
353
352
354
$ this ->logger ->info (
@@ -361,7 +363,9 @@ private function isDeployed(Package $package)
361
363
// phpcs:ignore Magento2.Functions.DiscouragedFunction
362
364
return pcntl_wexitstatus ($ status ) === 0 ;
363
365
} elseif ($ result === -1 ) {
366
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
364
367
$ errno = pcntl_errno ();
368
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
365
369
$ strerror = pcntl_strerror ($ errno );
366
370
367
371
throw new \RuntimeException (
@@ -401,6 +405,7 @@ private function checkTimeout()
401
405
* Protect against zombie process
402
406
*
403
407
* @throws \RuntimeException
408
+ * @SuppressWarnings(PHPMD.UnusedLocalVariable)
404
409
* @return void
405
410
*/
406
411
public function __destruct ()
@@ -417,7 +422,9 @@ public function __destruct()
417
422
418
423
// phpcs:ignore Magento2.Functions.DiscouragedFunction
419
424
if (pcntl_waitpid ($ pid , $ status ) === -1 ) {
425
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
420
426
$ errno = pcntl_errno ();
427
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
421
428
$ strerror = pcntl_strerror ($ errno );
422
429
423
430
throw new \RuntimeException (
0 commit comments