[CRIU] Re: [PATCH cr 09/12] pipes: add functions to restore pipes
Pavel Emelyanov
xemul at parallels.com
Thu Apr 5 08:05:29 EDT 2012
On 04/05/2012 03:47 PM, Andrey Vagin wrote:
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> files.c | 5 ++
> include/files.h | 4 ++
> pipes.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 133 insertions(+), 0 deletions(-)
>
> +#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
> +static int set_fd_flags(int fd, int flags)
> +{
> + int old;
> +
> + old = fcntl(fd, F_GETFL, 0);
> + if (old < 0)
> + return old;
> +
> + flags = (SETFL_MASK & flags) | (old & ~SETFL_MASK);
> +
> + return fcntl(fd, F_SETFL, flags);
> +}
Worth doing separate patch for this?
More information about the CRIU
mailing list