resource.setrlimit(resource, limits)
Sets new limits of consumption of resource. The limits argument must be a tuple (soft, hard)
of two integers describing the new limits. A value of RLIM_INFINITY
can be used to request a limit that is unlimited.
Raises ValueError
if an invalid resource is specified, if the new soft limit exceeds the hard limit, or if a process tries to raise its hard limit. Specifying a limit of RLIM_INFINITY
when the hard or system limit for that resource is not unlimited will result in a ValueError
. A process with the effective UID of super-user can request any valid limit value, including unlimited, but ValueError
will still be raised if the requested limit exceeds the system imposed limit.
setrlimit
may also raise error
if the underlying system call fails.
Please login to continue.