[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

How to set other process quota by setrlimit



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]