]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: do_lxcapi_create()
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 23 Feb 2018 13:18:14 +0000 (14:18 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 20:21:05 +0000 (22:21 +0200)
thread-safety: s/exit()/_exit()/g

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

index 44f1a91b81c1b673c708c9c5a90fe22de7dea610..8f52c4b2eafa3aae0ae5b0dd6c9f8f8e7de55f37 100644 (file)
@@ -1546,8 +1546,8 @@ static void lxcapi_clear_config(struct lxc_container *c)
  * arguments, you can just pass NULL.
  */
 static bool do_lxcapi_create(struct lxc_container *c, const char *t,
-               const char *bdevtype, struct bdev_specs *specs, int flags,
-               char *const argv[])
+                            const char *bdevtype, struct bdev_specs *specs,
+                            int flags, char *const argv[])
 {
        int partial_fd;
        pid_t pid;
@@ -1641,7 +1641,7 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
                if (!bdev) {
                        ERROR("Failed to create %s storage for %s",
                              bdevtype ? bdevtype : "(none)", c->name);
-                       exit(EXIT_FAILURE);
+                       _exit(EXIT_FAILURE);
                }
 
                /* Save config file again to store the new rootfs location. */
@@ -1652,9 +1652,9 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
                         */
                        bdev->ops->umount(bdev);
                        bdev->ops->destroy(bdev);
-                       exit(EXIT_FAILURE);
+                       _exit(EXIT_FAILURE);
                }
-               exit(EXIT_SUCCESS);
+               _exit(EXIT_SUCCESS);
        }
        if (wait_for_pid(pid) != 0)
                goto out_unlock;