Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $options['cpuLimit'] + 1, # hard limit
  2.  
  3. if ( php_uname( 's' ) == 'Linux' ) {
  4. // Limit memory and CPU
  5. $cmd = wfEscapeShellArg(
  6. 'exec', # proc_open() passes $cmd to 'sh -c' on Linux, so add an 'exec' to bypass it
  7. '/bin/sh',
  8. __DIR__ . '/lua_ulimit.sh',
  9. $options['cpuLimit'], # soft limit (SIGXCPU)
  10. $options['cpuLimit'] + 1, # hard limit
  11. intval( $options['memoryLimit'] / 1024 ),
  12. $cmd );
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement