]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
utils: lxc_popen()
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 23 Feb 2018 13:30:55 +0000 (14:30 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 24 Feb 2018 20:37:54 +0000 (21:37 +0100)
thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.c

index c824e9b99abca95b8c1475ad89a61a09794552bc..98b4655cfaccdd31d48bcbed46c23fdf0a87cf26 100644 (file)
@@ -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]);