diff options
author | Andrey Vagin <avagin@openvz.org> | 2015-02-09 14:06:13 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2015-02-09 14:06:13 +0300 |
commit | aa2d9208245599b2eb684a9ec7a92c88b6b601d7 (patch) | |
tree | d63edf67e4ae81554a82a02c17707101d522f233 | |
parent | 9ebb3738b2d097b2fdff52c85f67491784e401bc (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |