daemon: first take name on the bus, then return in starter process

http://pulseaudio.org/ticket/748
This commit is contained in:
Lennart Poettering 2010-01-14 02:33:49 +01:00
parent ea29b11097
commit 83eb8afc5f

View file

@ -1027,15 +1027,6 @@ int main(int argc, char *argv[]) {
* from now on, if requested */
c->disallow_module_loading = !!conf->disallow_module_loading;
#ifdef HAVE_FORK
if (daemon_pipe[1] >= 0) {
int ok = 0;
pa_loop_write(daemon_pipe[1], &ok, sizeof(ok), NULL);
pa_close(daemon_pipe[1]);
daemon_pipe[1] = -1;
}
#endif
#ifdef HAVE_DBUS
if (!conf->system_instance) {
if (!(server_lookup = pa_dbusobj_server_lookup_new(c)))
@ -1048,6 +1039,15 @@ int main(int argc, char *argv[]) {
goto finish;
#endif
#ifdef HAVE_FORK
if (daemon_pipe[1] >= 0) {
int ok = 0;
pa_loop_write(daemon_pipe[1], &ok, sizeof(ok), NULL);
pa_close(daemon_pipe[1]);
daemon_pipe[1] = -1;
}
#endif
pa_log_info(_("Daemon startup complete."));
retval = 0;