[lxc-devel] [lxc/master] lxc_usernsexec: continuing after unshare fails leads to confusing and…
xmcqueen on Github
lxc-bot at linuxcontainers.org
Tue Jun 4 03:53:05 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 330 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190603/9b61dc33/attachment.bin>
-------------- next part --------------
From ea95c21951d8631242aae6b4ab8cb15f93555060 Mon Sep 17 00:00:00 2001
From: Brian McQueen <bmcqueen at linkedin.com>
Date: Mon, 3 Jun 2019 20:51:48 -0700
Subject: [PATCH] lxc_usernsexec: continuing after unshare fails leads to
confusing and misleading error messages
---
src/lxc/cmd/lxc_usernsexec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lxc/cmd/lxc_usernsexec.c b/src/lxc/cmd/lxc_usernsexec.c
index 3641d94dfb..608001e8cd 100644
--- a/src/lxc/cmd/lxc_usernsexec.c
+++ b/src/lxc/cmd/lxc_usernsexec.c
@@ -441,8 +441,10 @@ int main(int argc, char *argv[])
close(pipe_fds2[0]);
ret = lxc_read_nointr(pipe_fds1[0], buf, 1);
- if (ret <= 0)
+ if (ret <= 0) {
CMD_SYSERROR("Failed to read from pipe file descriptor %d", pipe_fds1[0]);
+ _exit(EXIT_FAILURE);
+ }
buf[0] = '1';
More information about the lxc-devel
mailing list