Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1820,14 +1820,14 @@ |
1821 | 1821 | } |
1822 | 1822 | |
1823 | 1823 | if ( php_uname( 's' ) == 'Linux' ) { |
1824 | | - $time = ini_get( 'max_execution_time' ); |
| 1824 | + $time = intval( ini_get( 'max_execution_time' ) ); |
1825 | 1825 | $mem = intval( $wgMaxShellMemory ); |
1826 | 1826 | $filesize = intval( $wgMaxShellFileSize ); |
1827 | 1827 | |
1828 | 1828 | if ( $time > 0 && $mem > 0 ) { |
1829 | | - $script = "$IP/bin/ulimit-tvf.sh"; |
| 1829 | + $script = "$IP/bin/ulimit4.sh"; |
1830 | 1830 | if ( is_executable( $script ) ) { |
1831 | | - $cmd = escapeshellarg( $script ) . " $time $mem $filesize $cmd"; |
| 1831 | + $cmd = escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd ); |
1832 | 1832 | } |
1833 | 1833 | } |
1834 | 1834 | } elseif ( php_uname( 's' ) == 'Windows NT' ) { |
Index: trunk/phase3/bin/ulimit4.sh |
— | — | @@ -0,0 +1,4 @@ |
| 2 | +#!/bin/bash |
| 3 | + |
| 4 | +ulimit -t $1 -v $2 -f $3 |
| 5 | +eval "$4" |
Property changes on: trunk/phase3/bin/ulimit4.sh |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 6 | + native |
Added: svn:executable |
2 | 7 | + * |