[CRIU] [PATCH 2/4] parasite: Dump blocked thread signals mask

Cyrill Gorcunov gorcunov at openvz.org
Tue Oct 30 17:57:37 EDT 2012


---
 include/parasite.h |    1 +
 parasite.c         |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/parasite.h b/include/parasite.h
index 3704522..3b57631 100644
--- a/include/parasite.h
+++ b/include/parasite.h
@@ -92,6 +92,7 @@ struct parasite_dump_creds {
 struct parasite_dump_thread_info {
 	unsigned int		*tid_addr;
 	int			tid;
+	k_rtsigset_t		blocked;
 };
 
 #define PARASITE_MAX_FDS	(PAGE_SIZE / sizeof(int))
diff --git a/parasite.c b/parasite.c
index adf8374..811b063 100644
--- a/parasite.c
+++ b/parasite.c
@@ -354,11 +354,15 @@ static int dump_thread_info(struct parasite_dump_thread_info *args)
 
 	ret = sys_prctl(PR_GET_TID_ADDRESS, (unsigned long) &args->tid_addr, 0, 0, 0);
 	if (ret)
-		return ret;
+		goto err;
 
 	args->tid = sys_gettid();
 
-	return 0;
+	ksigfillset(&args->blocked);
+	ret = sys_sigprocmask(SIG_SETMASK, NULL, &args->blocked, sizeof(k_rtsigset_t));
+
+err:
+	return ret;
 }
 
 static int drain_fds(struct parasite_drain_fd *args)
-- 
1.7.7.6



More information about the CRIU mailing list