Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $options['cpuLimit'] + 1, # hard limit
- if ( php_uname( 's' ) == 'Linux' ) {
- // Limit memory and CPU
- $cmd = wfEscapeShellArg(
- 'exec', # proc_open() passes $cmd to 'sh -c' on Linux, so add an 'exec' to bypass it
- '/bin/sh',
- __DIR__ . '/lua_ulimit.sh',
- $options['cpuLimit'], # soft limit (SIGXCPU)
- $options['cpuLimit'] + 1, # hard limit
- intval( $options['memoryLimit'] / 1024 ),
- $cmd );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement