hal/hald/linux2 hotplug.c, 1.12, 1.13 hotplug.h, 1.6, 1.7 osspec.c, 1.19, 1.20

David Zeuthen david at freedesktop.org
Thu Feb 24 19:32:50 PST 2005


Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv20695/hald/linux2

Modified Files:
	hotplug.c hotplug.h osspec.c 
Log Message:
2005-02-24  David Zeuthen  <davidz at redhat.com>

	Finally got around to implementing the bit that made the parent wait
	for device probing when daemonizing. Hope that it's right this time
	cause the last time it resulted in breaking peoples pkg updates :-):
	
	https://www.redhat.com/archives/fedora-test-list/2004-August/msg00785.html	

	* hald/linux2/osspec.c (hotplug_queue_now_empty): New function; call
	osspec_probe_done if we're initialising and don't do anything else

	* hald/linux2/hotplug.h: Export prototype for hotplug_queue_now_empty

	* hald/linux2/hotplug.c (hotplug_event_process_queue): Call the
	function hotplug_queue_now_empty when we are out of hotplug (or
	coldplug :-) events to process.

	* hald/hald.c (handle_sigchld): New function
	(parent_wait_for_child): New function
	(main): Wait for child to finish device probing when daemonizing



Index: hotplug.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/hotplug.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- hotplug.c	24 Feb 2005 16:50:35 -0000	1.12
+++ hotplug.c	25 Feb 2005 03:32:48 -0000	1.13
@@ -365,9 +365,11 @@
 {
 	HotplugEvent *hotplug_event;
 
-
-	if (hotplug_event_queue == NULL)
+	if (hotplug_events_in_progress == NULL && 
+	    (hotplug_event_queue == NULL || g_queue_is_empty (hotplug_event_queue))) {
+		hotplug_queue_now_empty ();
 		goto out;
+	}
 
 	/* do not process events if some other event is in progress 
 	 *

Index: hotplug.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/hotplug.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hotplug.h	24 Feb 2005 17:33:03 -0000	1.6
+++ hotplug.h	25 Feb 2005 03:32:48 -0000	1.7
@@ -96,4 +96,6 @@
 
 gboolean hotplug_reprobe_tree (HalDevice *d);
 
+void hotplug_queue_now_empty (void);
+
 #endif /* HOTPLUG_H */

Index: osspec.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/osspec.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- osspec.c	25 Feb 2005 01:55:08 -0000	1.19
+++ osspec.c	25 Feb 2005 03:32:48 -0000	1.20
@@ -353,6 +353,13 @@
 	hotplug_event_process_queue ();
 }
 
+void
+hotplug_queue_now_empty (void)
+{
+	if (hald_is_initialising)
+		osspec_probe_done ();
+}
+
 void 
 osspec_probe (void)
 {




More information about the hal-commit mailing list