posix_setrlimit
Description
The posix_setrlimit of POSIX for PHP sets the system resource limits.
Syntax
posix_setrlimit( int $resource, int $soft_limit, int $hard_limit ): bool
Parameters
resource
The resource limit constant corresponding to the limit that is being set.
soft_limit
The soft limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.
hard_limit
The hard limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.
Return
Returns true on success or false on failure.
Examples
1 · resource soft_limit hard_limit
<? $resource = POSIX_RLIMIT_CORE; $soft_limit = 0; $hard_limit = POSIX_RLIMIT_INFINITY; $return = posix_setrlimit($resource, $soft_limit, $hard_limit); var_export($return); ?>
true
Links
POSIX
- posix_access
- posix_ctermid
- posix_eaccess
- posix_errno
- posix_fpathconf
- posix_get_last_error
- posix_getcwd
- posix_getegid
- posix_geteuid
- posix_getgid
- posix_getgrgid
- posix_getgrnam
- posix_getgroups
- posix_getlogin
- posix_getpgid
- posix_getpgrp
- posix_getpid
- posix_getppid
- posix_getpwnam
- posix_getpwuid
- posix_getrlimit
- posix_getsid
- posix_getuid
- posix_initgroups
- posix_isatty
- posix_kill
- posix_mkfifo
- posix_mknod
- posix_pathconf
- posix_setegid
- posix_seteuid
- posix_setgid
- posix_setpgid
- posix_setsid
- posix_setuid
- posix_strerror
- posix_sysconf
- posix_times
- posix_ttyname
- posix_uname