kernel-ark/tools
Greg Thelen 799105d514 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 <control_file> 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 <gthelen@google.com>
Acked-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2013-01-08 10:00:44 -08:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv tools/hv: Fix string types 2012-11-15 15:39:59 -08:00
include/tools tools/include: Add byteshift headers for endian access 2012-02-28 10:22:51 -08:00
lguest lguest: fix block request handling in example launcher. 2012-10-22 18:20:01 +10:30
lib/traceevent tools lib traceevent: Use 'const' in variables pointing to const strings 2012-11-09 17:42:47 -03:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
power Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-12-18 12:34:29 -08:00
scripts tools: Pass the target in descend 2012-11-19 22:10:36 +00:00
testing tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test 2012-12-17 17:15:27 -08:00
usb tools/usb: remove last USBFS user 2012-09-10 11:10:37 -07:00
virtio Some nice cleanups, and even a patch my wife did as a "live" demo for 2012-12-20 08:37:05 -08:00
vm UAPI: fix tools/vm/page-types.c 2012-10-25 14:37:53 -07:00
Makefile cgroups: move cgroup_event_listener.c to tools/cgroup 2013-01-07 09:41:28 -08:00