next up previous contents
Next: Other Process Calls Up: Process Management Previous: Timers   Contents

Resource Limits and Usage

The setrlimit call may be used to change the resource limits for the calling process. The call is implemented in kernel/sys.c. Linux requires the CAP_SYS_RESOURCE capability to use the setrlimit call to increase the soft or hard limit above the current hard limits, so Flask requires cap_sys_resource under the same conditions. Flask does not provide a process resource limit policy. Support for defining resource limits based on the security contexts of processes would be desirable. For now, Flask only controls the ability to increase the limit above the current hard limit.

The getrusage call may be used to get resource usage information for the calling process and its children. Similarly, the times call may be used to obtain the time usage of the calling process and its children. Linux does not control the use of these calls. Since the usage statistics of a child process are only added into the parent's combined statistics for its children if the parent reaps the child, the existing Flask wait controls are sufficient. No other controls seem necessary.


next up previous contents
Next: Other Process Calls Up: Process Management Previous: Timers   Contents