diff --git a/Doc/library/resource.rst b/Doc/library/resource.rst --- a/Doc/library/resource.rst +++ b/Doc/library/resource.rst @@ -52,11 +52,13 @@ 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 - ``-1`` can be used to specify the maximum possible upper limit. + ``-1`` can be used to request a limit that is infinite/unlimited. Raises :exc:`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 - (unless the process has an effective UID of super-user). Can also raise + (unless the process has an effective UID of super-user). Specifying an + infinite/unlmited limit when the hard or system limit for that resource not + unlimited will result in a :exc:`ValueError`. ``setrlimit`` may also raise :exc:`error` if the underlying system call fails. These symbols define resources whose consumption can be controlled using the