[CRIU] [PATCH] pycriu: Dont produce zombies

Andrei Vagin avagin at virtuozzo.com
Fri Apr 21 16:53:04 PDT 2017


Accepted, thanks!

On Thu, Apr 13, 2017 at 06:27:13PM +0300, Pavel Emelyanov wrote:
> When running criu_dump() with zero pid (self dump) a zombie
> from the library is left underneath the running processes
> and this zombie is thus written into the images.
> 
> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
> ---
>  lib/py/criu.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/py/criu.py b/lib/py/criu.py
> index 8725758..c4a09ea 100644
> --- a/lib/py/criu.py
> +++ b/lib/py/criu.py
> @@ -113,6 +113,9 @@ class _criu_comm_bin(_criu_comm):
>  					os._exit(0)
>  			else:
>  				exec_criu()
> +		else:
> +			if daemon:
> +				os.waitpid(p, 0)
>  
>  		css[0].close()
>  		self.swrk = struct.unpack('i', css[1].recv(4))[0]
> -- 
> 2.5.5
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list