[Devel] [PATCH 3/7] files: Provide virt_sid in fd_parms
Cyrill Gorcunov
gorcunov at gmail.com
Thu Feb 15 23:30:26 MSK 2018
Need it to distinguish current console instances.
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
---
criu/files.c | 1 +
criu/include/files.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/criu/files.c b/criu/files.c
index d5b523f56..2d5d1bc89 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -344,6 +344,7 @@ static int fill_fd_params(struct pid *owner_pid, int fd, int lfd,
p->flags = fdinfo.flags;
p->mnt_id = fdinfo.mnt_id;
p->pid = owner_pid->real;
+ p->virt_sid = owner_pid->item ? owner_pid->item->sid : 0;
p->fd_flags = opts->flags;
fown_entry__init(&p->fown);
diff --git a/criu/include/files.h b/criu/include/files.h
index 18a96da64..2b0b8af6d 100644
--- a/criu/include/files.h
+++ b/criu/include/files.h
@@ -45,6 +45,7 @@ struct fd_parms {
char fd_flags;
struct stat stat;
pid_t pid;
+ pid_t virt_sid;
FownEntry fown;
struct fd_link *link;
long fs_type;
--
2.14.3
More information about the Devel
mailing list