Querying and changing resource limit values

We now understand that it's the kernel (the OS) that sets up resource limits per process and tracks usage, even killing the process if necessaryif it attempts to exceed a resource's hard limit. This raises the question: is there a way one can change the soft and hard resource-limit values? We've already seen it in fact: ulimit. More than that, though, the deeper question is: are we allowed to set any hard/soft limits?

The kernel has certain preset rules regarding the changing of a resource limit. Querying or setting a process's resource limits can only be done by the calling process upon itself or upon a process that it owns; more correctly, for any other process besides itself, the process must ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.