utils: run_command()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-02-23 14:31:12 +01:00
parent 03f618afc3
commit d8b3f9c34a
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -2242,13 +2242,13 @@ int run_command(char *buf, size_t buf_size, int (*child_fn)(void *), void *args)
if (ret < 0) { if (ret < 0) {
SYSERROR("failed to duplicate std{err,out} file descriptor"); SYSERROR("failed to duplicate std{err,out} file descriptor");
exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
/* Does not return. */ /* Does not return. */
child_fn(args); child_fn(args);
ERROR("failed to exec command"); ERROR("failed to exec command");
exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
/* close the write-end of the pipe */ /* close the write-end of the pipe */