Unverified Commit c5aca615 by Christian Brauner Committed by GitHub

Merge pull request #2532 from tcharding/unshare-err

usernsexec: Make err out vebose for unshare error
parents 3193354c ede912b4
...@@ -375,7 +375,8 @@ int main(int argc, char *argv[]) ...@@ -375,7 +375,8 @@ int main(int argc, char *argv[])
ret = unshare(flags); ret = unshare(flags);
if (ret < 0) { if (ret < 0) {
perror("unshare"); fprintf(stderr,
"Failed to unshare mount and user namespace\n");
return 1; return 1;
} }
buf[0] = '1'; buf[0] = '1';
...@@ -399,9 +400,13 @@ int main(int argc, char *argv[]) ...@@ -399,9 +400,13 @@ int main(int argc, char *argv[])
close(pipe_fds1[1]); close(pipe_fds1[1]);
close(pipe_fds2[0]); close(pipe_fds2[0]);
if (lxc_read_nointr(pipe_fds1[0], buf, 1) < 1) { ret = lxc_read_nointr(pipe_fds1[0], buf, 1);
if (ret < 0) {
perror("read pipe"); perror("read pipe");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} else if (ret == 0) {
fprintf(stderr, "Failed to read from pipe\n");
exit(EXIT_FAILURE);
} }
buf[0] = '1'; buf[0] = '1';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment