2 Answers
2

I'm going to give it a try. Looks like I just have to echo pid of all running processes of the user into /tasks. It's a bit annoying that if the user tries to open another SSH connection then new processes will not be added to the cgroup.
–
Aleksandr LevchukMay 6 '11 at 2:06

I could not try it. I have 2.6.36 openvz kernel for some reason I don't have the cgroup fs type when I try to do mount -t cgroup -ofreezer freezer /containers but I seems to work on Ubunut 11.04 (Linux 2.6.38)
–
Aleksandr LevchukMay 7 '11 at 4:03

This could cause problems depending on order in which pkill sends the signals. For example, suspending a child process before the parent will cause bash for-loops to break. Also, what if the user already had some processes suspended (e.g. Ctrl-Z)?
–
Aleksandr LevchukMay 5 '11 at 23:42