• Greg Thelen's avatar
    cgroups: fix cgroup_event_listener error handling · 799105d5
    Greg Thelen authored
    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: 's avatarGreg Thelen <gthelen@google.com>
    Acked-by: 's avatarLi Zefan <lizefan@huawei.com>
    Signed-off-by: 's avatarTejun Heo <tj@kernel.org>
    799105d5
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile Loading commit data...
cgroup_event_listener.c Loading commit data...