summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-18 17:21:03 +0200
committerTom Gundersen <teg@jklm.no>2015-05-18 23:49:35 +0200
commitf53d1fcdb355125a1347acf0d2d1ffa7264d6bfe (patch)
treed9de6e18028e0bb978cf8ecb189f1627a191c17d /src
parent712cebf146b65136f02b49eb0f64a14f4628aec9 (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.
Diffstat (limited to 'src')
-rw-r--r--src/udev/udevd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 4f43a6fe12..19640cb6ea 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1507,7 +1507,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();
@@ -1697,7 +1699,6 @@ int main(int argc, char *argv[]) {
exit:
if (manager)
udev_ctrl_cleanup(manager->ctrl);
-exit_daemonize:
mac_selinux_finish();
log_close();
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;