docker/libcontainer — pull request #303 by dqminh (2014-12-17 15:34:35+00:00)
Title: [RFC] Exec process should have its own cgroup

This is not completed yet. I'm opening the pull request early to request for more comments.

- [x] create sub-cgroups for each execin process
- [ ] track and remove orphan process after the execin process finishes
- [x] cleanup sub-cgroups after the execin process finishes

Some questions:
- How should we track and remove orphan process ( or i guess in general reliably send signal to all processes in a cgroup )? My initial thought on this is to freeze the subcgroup, send the signal to all processes and then unfreeze the subcgroup to let the process receive the signal. Then we wait for the processes to die before cleaning the cgroups.