Skip to content

Commit

Permalink
utils: run_command()
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 Feb 24, 2018
1 parent 03f618a commit d8b3f9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/utils.c
Expand Up @@ -2242,13 +2242,13 @@ int run_command(char *buf, size_t buf_size, int (*child_fn)(void *), void *args)

if (ret < 0) {
SYSERROR("failed to duplicate std{err,out} file descriptor");
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}

/* Does not return. */
child_fn(args);
ERROR("failed to exec command");
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}

/* close the write-end of the pipe */
Expand Down

0 comments on commit d8b3f9c

Please sign in to comment.