Skip to content

Commit

Permalink
lxccontainer: do_lxcapi_detach_interface()
Browse files Browse the repository at this point in the history
thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Aug 23, 2018
1 parent 9717124 commit 8701190
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lxc/lxccontainer.c
Expand Up @@ -4160,21 +4160,21 @@ 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. */
if (ret) {
ret = lxc_netdev_down(ifname);
if (ret) {
ERROR("Failed to set network device \"%s\" down", ifname);
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}
}

Expand All @@ -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);
Expand Down

0 comments on commit 8701190

Please sign in to comment.