Re: CVS 1-17-05 vs 1-21-05



Bill,

Can you apply this patch?  I believe it will fix the problem in daemon 
mode.  Its been committed to CVS but if you're pulling from anoncvs, you 
won't get the fix for a while...

>From the base NetworkManager directory,

patch -p0 < /path/to/daemonize-earlier.patch

Dan

? daemonize-earlier.patch
? scan-print.diff
Index: src/NetworkManager.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManager.c,v
retrieving revision 1.45
diff -u -r1.45 NetworkManager.c
--- src/NetworkManager.c	21 Jan 2005 19:32:08 -0000	1.45
+++ src/NetworkManager.c	22 Jan 2005 04:25:44 -0000
@@ -694,6 +694,12 @@
 		}
 	}
 
+	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);
@@ -761,12 +767,6 @@
 	link_source = g_timeout_source_new (5000);
 	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))
 	{


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]