Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgrulesengd: Do not ignore changes of short-lived processes
When a double-forking daemon spawns the shortlived forking process and we fail to classify it in time, the child does not inherit (the intended) cgroup membership. We could process all children after receiving PROC_EVENT_FORK to remedy this. But since we already have the timestamp logic introduced in 8953fc0 ("Changelog v2: * Use clock_gettime(2) for getting timestamp since a system boot. * Change parent_info's memory to dynamic allocation.") and it may be too much work for all fork(2) calls, we extend the usage of parent_info by assuming the parent would have changed its cgroup membership by our actions even if it terminated quickly. v2: Handle non-existent /proc/$PID/tasks as short-lived process too Use cgroup_get_last_errno() helper Signed-off-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
- Loading branch information