Commit cdce5d21 authored by Pavel Emelyanov's avatar Pavel Emelyanov

util: Make set_proc_fd report success/error only

Returning the new proc fd value is useless.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3e6f1ae8
...@@ -1274,14 +1274,11 @@ static int fill_zombies_pids(struct pstree_item *item) ...@@ -1274,14 +1274,11 @@ static int fill_zombies_pids(struct pstree_item *item)
static int dump_zombies(void) static int dump_zombies(void)
{ {
struct pstree_item *item; struct pstree_item *item;
int oldfd, ret = -1; int ret = -1;
int pidns = current_ns_mask & CLONE_NEWPID; int pidns = current_ns_mask & CLONE_NEWPID;
if (pidns) { if (pidns && set_proc_fd(pidns_proc))
oldfd = set_proc_fd(pidns_proc); return -1;
if (oldfd < 0)
return -1;
}
for_each_pstree_item(item) { for_each_pstree_item(item) {
if (item->state != TASK_DEAD) if (item->state != TASK_DEAD)
......
...@@ -179,7 +179,9 @@ void close_proc() ...@@ -179,7 +179,9 @@ void close_proc()
int set_proc_fd(int fd) int set_proc_fd(int fd)
{ {
return install_service_fd(PROC_FD_OFF, fd); if (install_service_fd(PROC_FD_OFF, fd) < 0)
return -1;
return 0;
} }
int set_proc_mountpoint(char *path) int set_proc_mountpoint(char *path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment