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.
This commit is contained in:
Tom Gundersen
2015-05-18 23:49:35 +02:00
parent 712cebf146
commit f53d1fcdb3
+3 -2
View File
@@ -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;