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

Pavel Emelyanov xemul at parallels.com
Mon Oct 28 03:56:47 PDT 2013


On 10/28/2013 12:13 PM, Andrey Vagin wrote:
> 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;
>  
> 


applied


More information about the CRIU mailing list