Quoting Stéphane Graber ([email protected]):
> Signed-off-by: Stéphane Graber <[email protected]>

Acked-by: Serge E. Hallyn <[email protected]>

> ---
>  src/lxc/lxc_usernsexec.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c
> index b82bcf8..e40fa53 100644
> --- a/src/lxc/lxc_usernsexec.c
> +++ b/src/lxc/lxc_usernsexec.c
> @@ -69,13 +69,16 @@ static void opentty(const char * tty) {
>  
>       fd = open(tty, O_RDWR | O_NONBLOCK);
>       if (fd == -1) {
> -             printf("WARN: could not reopen tty: %s", strerror(errno));
> +             printf("WARN: could not reopen tty: %s\n", strerror(errno));
>               return;
>       }
>  
>       flags = fcntl(fd, F_GETFL);
>       flags &= ~O_NONBLOCK;
> -     fcntl(fd, F_SETFL, flags);
> +     if (fcntl(fd, F_SETFL, flags) < 0) {
> +             printf("WARN: could not set fd flags: %s\n", strerror(errno));
> +             return;
> +     }
>  
>       for (i = 0; i < fd; i++)
>               close(i);
> -- 
> 1.9.rc1
> 
> _______________________________________________
> lxc-devel mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-devel
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to