[CRIU] [PATCH] restore: decode exit status in sigchld_handler

Pavel Emelyanov xemul at parallels.com
Wed Aug 28 09:16:59 EDT 2013


On 08/26/2013 04:33 PM, Andrey Vagin wrote:
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index d894ad0..14bf300 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -958,6 +958,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
>  		pid = waitpid(root_item->pid.real, &status, WNOHANG);
>  		if (pid <= 0)
>  			return;
> +		exit = WIFEXITED(status);
> +		status = exit ? WEXITSTATUS(status) : WTERMSIG(status);
>  	}
>  
>  	if (!current || status)
> 


applied


More information about the CRIU mailing list