[CRIU] Re: [PATCH 07/11] parasite: Add interface for file
descriptors draining
Pavel Emelyanov
xemul at parallels.com
Thu Mar 29 06:57:24 EDT 2012
On 03/28/2012 05:36 PM, Cyrill Gorcunov wrote:
>
> Just implemented but not yet used in dumping procedure,
> this will be addressed in further patches.
>
> Note the space for file descriptors is statically allocated
> in 8K arguments area, not on stack.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> include/parasite-syscall.h | 2 +
> include/parasite.h | 14 ++++++++++++
> include/util-net.h | 2 +-
> parasite-syscall.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
> parasite.c | 20 +++++++++++++++++
> util-net.c | 2 +-
> 6 files changed, 88 insertions(+), 2 deletions(-)
>
> diff --git a/util-net.c b/util-net.c
> index 868522a..52f6692 100644
> --- a/util-net.c
> +++ b/util-net.c
> @@ -123,5 +123,5 @@ int recv_fds(int sock, int *fds, int nr_fds)
> builtin_memcpy(&fds[i], fds_rx, sizeof(int) * min_fd);
> }
>
> - return 0;
> + return min_fd;
> }
1. This should be in patch #6
2. returning min_fd is wrong, this will only report the amount of
fds transferred at last loop iteration, not the whole amount of them
More information about the CRIU
mailing list