From: Christian Brauner Date: Sat, 24 Feb 2018 19:12:16 +0000 (+0100) Subject: criu: do_restore() X-Git-Tag: lxc-2.0.10~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28eafc46ea227d022076835b9d88cda103f75592;p=thirdparty%2Flxc.git criu: do_restore() thread-safety: s/exit()/_exit()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/criu.c b/src/lxc/criu.c index a558af9af..3fdb6017f 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -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)