Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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]);