[CRIU] [PATCH] parasite: handle errors while a transport socket is being created
Dmitry Safonov
dsafonov at virtuozzo.com
Thu Jul 28 12:08:36 PDT 2016
On 07/28/2016 09:41 PM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>
>
> Currently if socket() or connect() syscall-s failed, parasite cures itself,
> but criu has not got any signals and waits on accept().
>
> This patch adds a futex to synchronize parasite and criu. The server socket
> is created with SOCK_NONBLOCK and waits on the futex when a parasite
> connects to it, only then criu calls accept() and it returns immediately.
>
> Reported-by: Yohei Kamitsukasa <uhoidx at gmail.com>
> Cc: Yohei Kamitsukasa <uhoidx at gmail.com>
> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> ---
Heh, and I've cooked something alike with alarm() and syscall's retval
with syscall's number through parasite_init_args.
But I think this way with futex is prettier.
Reviewed-by: Dmitry Safonov <dsafonov at virtuozzo.com>
--
Dmitry
More information about the CRIU
mailing list