From: Greg Thelen Date: Mon, 7 Jan 2013 19:50:17 +0000 (-0800) Subject: cgroups: fix cgroup_event_listener error handling X-Git-Tag: v3.9-rc1~157^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=799105d514384b80cbe3182dbcb4ed30aa07e1f5;p=pandora-kernel.git cgroups: fix cgroup_event_listener error handling The error handling in cgroup_event_listener.c did not correctly deal with either an error opening either or cgroup.event_control. Due to an uninitialized variable the program exit code was undefined if either of these opens failed. This patch simplifies and corrects cgroup_event_listener.c error handling by: 1. using err*() rather than printf(),exit() 2. depending on process exit to close open files With this patch failures always return non-zero error. Signed-off-by: Greg Thelen Acked-by: Li Zefan Signed-off-by: Tejun Heo --- Reading git-diff-tree failed