mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
util: Make set_proc_fd report success/error only
Returning the new proc fd value is useless. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
3e6f1ae82d
commit
cdce5d216d
@ -1274,14 +1274,11 @@ static int fill_zombies_pids(struct pstree_item *item)
|
||||
static int dump_zombies(void)
|
||||
{
|
||||
struct pstree_item *item;
|
||||
int oldfd, ret = -1;
|
||||
int ret = -1;
|
||||
int pidns = current_ns_mask & CLONE_NEWPID;
|
||||
|
||||
if (pidns) {
|
||||
oldfd = set_proc_fd(pidns_proc);
|
||||
if (oldfd < 0)
|
||||
return -1;
|
||||
}
|
||||
if (pidns && set_proc_fd(pidns_proc))
|
||||
return -1;
|
||||
|
||||
for_each_pstree_item(item) {
|
||||
if (item->state != TASK_DEAD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user