2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 00:35:23 +00:00

files: use PROC_SELF when a process accesses its /proc/PID

If a process is executed in another pidns, a /proc/PID doesn't link with
the proper process.

This patch fixes a problem like this:
   1: Error (util.c:106): Unable to close fd 33: Bad file descriptor

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2015-02-09 14:06:13 +03:00
committed by Pavel Emelyanov
parent 9ebb3738b2
commit aa2d920824

View File

@@ -938,7 +938,7 @@ int close_old_fds(struct pstree_item *me)
struct dirent *de;
int fd, ret;
dir = opendir_proc(getpid(), "fd");
dir = opendir_proc(PROC_SELF, "fd");
if (dir == NULL)
return -1;