mirror of
https://github.com/systemd/systemd.git
synced 2024-11-15 07:24:00 +03:00
core: rearrange if blocks a bit
This commit is contained in:
parent
f6940be782
commit
befb5b6a71
@ -1515,12 +1515,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
/* All other variables are left as is, so that clients
|
||||
* can still read them via /proc/1/environ */
|
||||
}
|
||||
|
||||
/* Move out of the way, so that we won't block unmounts */
|
||||
assert_se(chdir("/") == 0);
|
||||
|
||||
if (arg_running_as == SYSTEMD_SYSTEM) {
|
||||
/* Become a session leader if we aren't one yet. */
|
||||
setsid();
|
||||
|
||||
@ -1528,6 +1523,9 @@ int main(int argc, char *argv[]) {
|
||||
umask(0);
|
||||
}
|
||||
|
||||
/* Move out of the way, so that we won't block unmounts */
|
||||
assert_se(chdir("/") == 0);
|
||||
|
||||
/* Make sure D-Bus doesn't fiddle with the SIGPIPE handlers */
|
||||
dbus_connection_set_change_sigpipe(FALSE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user