diff options
author | Tom Gundersen <teg@jklm.no> | 2015-05-27 08:44:53 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-05-27 08:44:53 -0400 |
commit | 9aee6bf164c53abf4ea25379f600cd1ed4f45150 (patch) | |
tree | 5ef8216d0721805d63590be88e3afdd95a9d5ef0 /src | |
parent | b831062ea7cfa5a8e6f6bcc570685a92532b60d8 (diff) |
udevd: main - use _exit() when daemonizing
Makes it a bit clearer what is going on, rather than jumping to the end of main().
No functional change.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udevd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 8966fa777e..578178008a 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1254,7 +1254,9 @@ int main(int argc, char *argv[]) { r = log_error_errno(errno, "fork of daemon failed: %m"); goto exit; default: - goto exit_daemonize; + mac_selinux_finish(); + log_close(); + _exit(EXIT_SUCCESS); } setsid(); @@ -1530,7 +1532,7 @@ int main(int argc, char *argv[]) { exit: udev_ctrl_cleanup(udev_ctrl); unlink(UDEV_ROOT_RUN "/udev/queue"); -exit_daemonize: + if (fd_ep >= 0) close(fd_ep); workers_free(); |