mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-24 02:35:41 +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:
parent
9ebb3738b2
commit
aa2d920824
1 changed files with 1 additions and 1 deletions
2
files.c
2
files.c
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue