From: Christian Brauner Date: Thu, 24 Aug 2017 11:43:15 +0000 (+0200) Subject: conf: log lxc-user-nic output X-Git-Tag: lxc-2.0.9~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78a4061074b161c2060181f901fa456aac5b3b0c;p=thirdparty%2Flxc.git conf: log lxc-user-nic output Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index af32d7abc..c5609ec4e 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3226,14 +3226,19 @@ static int unpriv_assign_nic(const char *lxcpath, char *lxcname, close(pipefd[1]); bytes = read(pipefd[0], &buffer, MAX_BUFFER_SIZE); - if (bytes < 0) + if (bytes < 0) { SYSERROR("Failed to read from pipe file descriptor."); + close(pipefd[0]); + return -1; + } buffer[bytes - 1] = '\0'; if (wait_for_pid(child) != 0) { + TRACE("lxc-user-nic failed to configure requested network"); close(pipefd[0]); return -1; } + TRACE("Received output \"%s\" from lxc-user-nic", buffer); /* close the read-end of the pipe */ close(pipefd[0]);