Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2015-02-09 14:06:13 +0300
committerPavel Emelyanov <xemul@parallels.com>2015-02-09 14:06:13 +0300
commitaa2d9208245599b2eb684a9ec7a92c88b6b601d7 (patch)
treed63edf67e4ae81554a82a02c17707101d522f233
parent9ebb3738b2d097b2fdff52c85f67491784e401bc (diff)
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>
-rw-r--r--files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/files.c b/files.c
index 412a99a2c..62749821b 100644
--- a/files.c
+++ b/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;