]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Changelog v2:
author\"Ken'ichi Ohmichi\ <oomichi@mxs.nes.nec.co.jp>
Thu, 7 May 2009 20:16:02 +0000 (01:46 +0530)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Thu, 7 May 2009 20:16:02 +0000 (01:46 +0530)
commit8953fc07c0498d1ddd9a04dc549ffb85862f4c5f
tree173db54f5d559bccf423b79c9464bd4d29ede084
parent485fe65a0daa23899d1e4c02620036a265560a57
Changelog v2:
 * Use clock_gettime(2) for getting timestamp since a system boot.
 * Change parent_info's memory to dynamic allocation.

This patch is for changing the cgroup of a forked process while parent
changing.

This patch adds the following sequence:
 1. Store both the timestamp and the process-id when changing the cgroup.
 2. If receiving a PROC_EVENT_FORK packet, check its parent-pid and its
    timestamp.
 3. If its parent-pid and the stored process-id are same and its timestamp
    is older than the stored timestamp, change the cgroup of forked process.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
src/daemon/Makefile.am
src/daemon/cgrulesengd.c