]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
criu: do_restore()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 24 Feb 2018 19:12:16 +0000 (20:12 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 20:30:01 +0000 (22:30 +0200)
thread-safety: s/exit()/_exit()/g

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

index a558af9afe9996dd16799a36026981e3253c43bc..3fdb6017f98236451a176cd2f5f0ee66468d84e6 100644 (file)
@@ -823,8 +823,9 @@ out_unlock:
        return !has_error;
 }
 
-// do_restore never returns, the calling process is used as the
-// monitor process. do_restore calls exit() if it fails.
+/* do_restore never returns, the calling process is used as the monitor process.
+ * do_restore calls _exit() if it fails.
+ */
 static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_opts *opts, char *criu_version)
 {
        int fd, ret;
@@ -1040,7 +1041,7 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
                if (ret)
                        lxc_abort(c->name, handler);
                lxc_fini(c->name, handler);
-               exit(ret);
+               _exit(ret);
        }
 
 out_fini_handler:
@@ -1065,7 +1066,7 @@ out:
                close(status_pipe);
        }
 
-       exit(1);
+       _exit(EXIT_FAILURE);
 }
 
 static int save_tty_major_minor(char *directory, struct lxc_container *c, char *tty_id, int len)