• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • posix_setrlimit()

    版本:php7

    (PHP 7)

    Set system resource limits

    说明

    posix_setrlimit(int $resource,int $softlimit,int $hardlimit): bool

    posix_setrlimit() sets the soft and hard limits for a given system resource.

    Each resource has an associated soft and hard limit. The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit. An unprivileged process may only set its soft limit to a value from 0 to the hard limit, and irreversibly lower its hard limit.

    参数

    $resource

    The resource limit constant corresponding to the limit that is being set.

    $softlimit

    The soft limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.

    $hardlimit

    The hard limit, in whatever unit the resource limit requires, or POSIX_RLIMIT_INFINITY.

    返回值

    成功时返回TRUE,或者在失败时返回FALSE

    参见

    上篇:posix_setpgid()

    下篇:posix_setsid()