The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5523

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
lxc_abstract_unix_recv_fds() used to return 0 if recvmsg() returned 0
and ret if it return < 0. Let's restore that behavior.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 844383f90ae1c7e69905f9c6e4d519da9a50cba8 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@ubuntu.com>
Date: Mon, 25 Feb 2019 15:53:11 +0100
Subject: [PATCH] util_linux_cgo: restore old behavior

lxc_abstract_unix_recv_fds() used to return 0 if recvmsg() returned 0
and ret if it return < 0. Let's restore that behavior.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
---
 shared/util_linux_cgo.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared/util_linux_cgo.go b/shared/util_linux_cgo.go
index 47a9d5e2dd..f4dc152519 100644
--- a/shared/util_linux_cgo.go
+++ b/shared/util_linux_cgo.go
@@ -215,7 +215,7 @@ int lxc_abstract_unix_recv_fds(int fd, int *recvfds, int 
num_recvfds,
        ret = recvmsg(fd, &msg, 0);
        if (ret <= 0) {
                fprintf(stderr, "%s - Failed to receive file descriptor\n", 
strerror(errno));
-               return -1;
+               return ret;
        }
 
        cmsg = CMSG_FIRSTHDR(&msg);
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to