How to set other process quota by setrlimit

Ian jonhson jonhson.ian at gmail.com
Thu Dec 13 07:55:30 UTC 2007


Hi,

We all know that we can set resource quota of process with pam_limits.so.
The module can enforce the resource usage (cpu, memory, maximal number of
open file, etc) by setrlimit.

It seems that the function, setrlimit(), can only set self resource
quota of process and
inherit by its child processes, right?

Because I adopted the function in one process to set another process'
resource quota,
and found nothing enforced happen. The other process can run as
before, not any limitation.

I don't know what I have designed is correct, using the setrlimit to
set other process resource
usage. If it is wrong, are there other ways to accomplish my target?

Thank you in advance.

Regards,
Ian




More information about the Pam-list mailing list