Skip to contentSkip to conversation

cgroup/cpuctl: clean cpuctl_task_* in case of OOM

PATCH New Jan Stancek 1 participant 1 message Sep 19, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cgroup/cpuctl: clean cpuctl_task_* in case of OOM

If one of cpuctl_task_* gets killed by OOM, it won't signal run script with SIGUSR1, and trap action "killall cpuctl_task_*;" never runs.

Try to kill all left over cpuctl_task_* in cleanup() to be sure, none are left behind.

---
 testcases/kernel/controllers/cpuctl/parameters.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/controllers/cpuctl/parameters.sh +2 -0
index 502944e..5f87695 100755
@@ -70,6 +70,8 @@ cleanup ()
         echo "Cleanup called";
 	killall cpuctl_def_task01 1>/dev/null 2>&1;
 	killall cpuctl_def_task02 1>/dev/null 2>&1;
+	killall cpuctl_task_* 1>/dev/null 2>&1;
+	sleep 1
         rm -f cpuctl_task_* 2>/dev/null
 	for task in `cat /dev/cpuctl/group_def/tasks`; do
 		echo $task > /dev/cpuctl/tasks 2>/dev/null 1>&2;

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list