From: Christian Brauner Date: Fri, 23 Feb 2018 13:22:24 +0000 (+0100) Subject: lxccontainer: do_lxcapi_detach_interface() X-Git-Tag: lxc-2.0.10~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87011905f9f6396eb4c2ebe16ea1c20ec8e1bf6c;p=thirdparty%2Flxc.git lxccontainer: do_lxcapi_detach_interface() thread-safety: s/exit()/_exit()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 7b82e9d56..d3bf0874b 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -4160,13 +4160,13 @@ static bool do_lxcapi_detach_interface(struct lxc_container *c, init_pid = do_lxcapi_init_pid(c); if (!switch_to_ns(init_pid, "net")) { ERROR("Failed to enter network namespace"); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } ret = lxc_netdev_isup(ifname); if (ret < 0) { ERROR("Failed to determine whether network device \"%s\" is up", ifname); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } /* netdev of ifname is up. */ @@ -4174,7 +4174,7 @@ static bool do_lxcapi_detach_interface(struct lxc_container *c, ret = lxc_netdev_down(ifname); if (ret) { ERROR("Failed to set network device \"%s\" down", ifname); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } } @@ -4185,10 +4185,10 @@ static bool do_lxcapi_detach_interface(struct lxc_container *c, ERROR("Network device \"%s\" not found", ifname); else ERROR("Failed to remove network device \"%s\"", ifname); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } - exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); } ret = wait_for_pid(pid);