Only use limit.sh if /bin/bash executable, instead of if linux.
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index c95c380..eb40e34 100644 (file)
@@ -2891,7 +2891,7 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(),
        $cmd = $envcmd . $cmd;
 
        $useLogPipe = false;
-       if ( php_uname( 's' ) == 'Linux' ) {
+       if ( is_executable( '/bin/bash' ) ) {
                $time = intval ( isset( $limits['time'] ) ? $limits['time'] : $wgMaxShellTime );
                if ( isset( $limits['walltime'] ) ) {
                        $wallTime = intval( $limits['walltime'] );