1 From 437b68f34c459d136c806e61dafb5825d2f97170 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
3 Date: Tue, 17 Apr 2018 13:32:28 +0200
4 Subject: [PATCH 4/6] api.c: Show warning when tasks file can not be opened
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Nikola Forró <nforro@redhat.com>
11 src/api.c | 12 ++++++++----
12 1 file changed, 8 insertions(+), 4 deletions(-)
14 diff --git a/src/api.c b/src/api.c
15 index 4d98081..51081b4 100644
18 @@ -1190,12 +1190,15 @@ static int __cgroup_attach_task_pid(char *path, pid_t tid)
22 - return ECGROUPNOTOWNER;
23 + ret = ECGROUPNOTOWNER;
26 - return ECGROUPNOTEXIST;
27 + ret = ECGROUPNOTEXIST;
30 - return ECGROUPNOTALLOWED;
31 + ret = ECGROUPNOTALLOWED;
35 ret = fprintf(tasks, "%d", tid);
37 @@ -1214,7 +1217,8 @@ static int __cgroup_attach_task_pid(char *path, pid_t tid)
39 cgroup_warn("Warning: cannot write tid %d to %s:%s\n",
40 tid, path, strerror(errno));