[CRIU] [PATCH 21/22] parasite: transfer a pointer on sigframe to parasite

Andrey Vagin avagin at openvz.org
Wed May 8 09:28:48 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/parasite.h | 2 ++
 parasite-syscall.c | 1 +
 pie/parasite.c     | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/include/parasite.h b/include/parasite.h
index 78797c7..9a94fd1 100644
--- a/include/parasite.h
+++ b/include/parasite.h
@@ -71,6 +71,8 @@ struct parasite_init_args {
 
 	int			nr_threads;
 	pid_t			real;
+
+	struct rt_sigframe	*sigframe;
 };
 
 struct parasite_log_args {
diff --git a/parasite-syscall.c b/parasite-syscall.c
index e6549a1..44b63bc 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -320,6 +320,7 @@ static int parasite_init(struct parasite_ctl *ctl, pid_t pid, int nr_threads)
 	args->p_addr_len = gen_parasite_saddr(&args->p_addr, pid);
 	args->nr_threads = nr_threads;
 	args->real = pid;
+	args->sigframe = ctl->threads[0].rsigframe;
 
 	if (sock == -1) {
 		int rst = -1;
diff --git a/pie/parasite.c b/pie/parasite.c
index c6b3d1c..55b7639 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -25,6 +25,8 @@ static struct tid_state_s {
 	futex_t		ack;
 	int		ret;
 
+	struct rt_sigframe *sigframe;
+
 	void		*next;
 	unsigned char	stack[PARASITE_STACK_SIZE] __aligned(8);
 } *tid_state;
@@ -225,6 +227,7 @@ static int init_thread(struct parasite_init_args *args)
 
 	tid_state[next_tid_state].tid = sys_gettid();
 	tid_state[next_tid_state].real = args->real;
+	tid_state[next_tid_state].sigframe = args->sigframe;
 
 	futex_set(&tid_state[next_tid_state].cmd, PARASITE_CMD_IDLE);
 	futex_set(&tid_state[next_tid_state].ack, PARASITE_CMD_IDLE);
-- 
1.8.2



More information about the CRIU mailing list