From 03f618afc338163801703f8561264d3abc46958e Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 23 Feb 2018 14:30:55 +0100 Subject: [PATCH] utils: lxc_popen() thread-safety: s/exit()/_exit()/g Signed-off-by: Christian Brauner --- src/lxc/utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index c824e9b99..98b4655cf 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -478,7 +478,7 @@ struct lxc_popen_FILE *lxc_popen(const char *command) ret = fcntl(pipe_fds[1], F_SETFD, 0); if (ret < 0) { close(pipe_fds[1]); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } /* duplicate stderr */ @@ -488,19 +488,19 @@ struct lxc_popen_FILE *lxc_popen(const char *command) ret = fcntl(pipe_fds[1], F_SETFD, 0); close(pipe_fds[1]); if (ret < 0) - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); /* unblock all signals */ ret = sigfillset(&mask); if (ret < 0) - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); ret = sigprocmask(SIG_UNBLOCK, &mask, NULL); if (ret < 0) - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); execl("/bin/sh", "sh", "-c", command, (char *)NULL); - exit(127); + _exit(127); } close(pipe_fds[1]); -- 2.47.2