[CRIU] [PATCH] parasite: wait for any child process

Andrey Vagin avagin at openvz.org
Mon Oct 28 01:13:53 PDT 2013


If parasite exited unexpectedly, CRIU gets SIGCHLD and handles it.
In sigchld handler we need to wait any child process.
Currently criu waits neighbours in its group, but a dumped
processes is in another group usually. Here is a typo.

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

diff --git a/parasite-syscall.c b/parasite-syscall.c
index 6956798..40f842f 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -346,7 +346,7 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
 	pr_err("si_code=%d si_pid=%d si_status=%d\n",
 		siginfo->si_code, siginfo->si_pid, siginfo->si_status);
 
-	pid = waitpid(0, &status, WNOHANG);
+	pid = waitpid(-1, &status, WNOHANG);
 	if (pid <= 0)
 		return;
 
-- 
1.8.3.1



More information about the CRIU mailing list