[CRIU] [PATCH 8/8] parasite: wait a specific pid

Andrey Vagin avagin at openvz.org
Fri Jun 14 07:04:59 EDT 2013


This code was written, when all threads were daemonized.
Now only a thread leader is daemonized.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 parasite-syscall.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index 5f10162..4853cf6 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -809,10 +809,7 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
 
 	/* Stop all threads on the enter point in sys_rt_sigreturn */
 	while (1) {
-		pid_t pid;
-
-		pid = wait4(-1, &status, __WALL, NULL);
-		if (pid < 0) {
+		if (wait4(pid, &status, __WALL, NULL) < 0) {
 			pr_perror("wait4 failed");
 			return -1;
 		}
-- 
1.8.2



More information about the CRIU mailing list