Thread (3 messages) 3 messages, 3 authors, 2013-01-08

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

From: Li Zefan <hidden>
Date: 2013-01-08 06:29:11
Also in: lkml

Possibly related (same subject, not in this thread)

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 <redacted>
Acked-by: Li Zefan <redacted>
---
 tools/cgroup/cgroup_event_listener.c |   72 ++++++++++-----------------------
 1 files changed, 22 insertions(+), 50 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help