Skip to content
Browse files

Do not use system() as it is sometimes disabled

  • Loading branch information...
1 parent 3e51763 commit dfff459cb78003ac1947de3d6a4c032a26f40131 @mattab mattab committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/CliMulti/Process.php
View
5 core/CliMulti/Process.php
@@ -155,8 +155,9 @@ public static function isSupported()
private static function returnsSuccessCode($command)
{
- system($command . ' > /dev/null 2>&1', $returnCode);
-
+ $exec = $command . ' > /dev/null 2>&1 & echo $?';
+ $returnCode = shell_exec($exec);
+ $returnCode = trim($returnCode);
return 0 == (int) $returnCode;
}

0 comments on commit dfff459

Please sign in to comment.
Something went wrong with that request. Please try again.