resource.prlimit(pid, resource[, limits])
Combines setrlimit() and getrlimit() in one function and supports to get and set the resources limits of an arbitrary process. If pid is 0, then the call applies to the current process. resource and limits have the same meaning as in setrlimit(), except that limits is optional.
When limits is not given the function returns the resource limit of the process pid. When limits is given the resource limit of the process is set and the former resource limi