2005-01-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - Daemonize earlier so that glib doesn't get confused (?) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@390 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -694,6 +694,12 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
}
|
||||
|
||||
if (become_daemon && daemon (0, 0) < 0)
|
||||
{
|
||||
syslog (LOG_ERR, "NetworkManager could not daemonize. errno = %d", errno);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
g_type_init ();
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
@@ -762,12 +768,6 @@ int main( int argc, char *argv[] )
|
||||
g_source_set_callback (link_source, nm_link_state_monitor, nm_data, NULL);
|
||||
link_source_id = g_source_attach (link_source, nm_data->main_context);
|
||||
|
||||
if (become_daemon && daemon (0, 0) < 0)
|
||||
{
|
||||
syslog (LOG_ERR, "NetworkManager could not daemonize. errno = %d", errno);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!nm_named_manager_start (nm_data->named, &error))
|
||||
{
|
||||
syslog (LOG_CRIT, "Couldn't initialize nameserver: %s", error->message);
|
||||
|
Reference in New Issue
Block a user