[tracker/extractor-remove-word-counting-review] re-enable the check for non-NULL pid, as it is really needed



commit db13f4e9dba63ee7f047ec71c70f18fe5f33b6d8
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue May 11 14:05:21 2010 +0200

    re-enable the check for non-NULL pid, as it is really needed

 src/libtracker-common/tracker-os-dependant-unix.c |    5 +++++
 src/libtracker-common/tracker-os-dependant-win.c  |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-common/tracker-os-dependant-unix.c b/src/libtracker-common/tracker-os-dependant-unix.c
index 746c613..266aa5d 100644
--- a/src/libtracker-common/tracker-os-dependant-unix.c
+++ b/src/libtracker-common/tracker-os-dependant-unix.c
@@ -103,6 +103,11 @@ tracker_spawn_async_with_channels (const gchar **argv,
 	g_return_val_if_fail (argv != NULL, FALSE);
 	g_return_val_if_fail (argv[0] != NULL, FALSE);
 	g_return_val_if_fail (timeout >= 0, FALSE);
+	g_return_val_if_fail (pid != NULL, FALSE);
+
+	/* Note: PID must be non-NULL because we're using the
+	 *  G_SPAWN_DO_NOT_REAP_CHILD option, so an explicit call to
+	 *  g_spawn_close_pid () will be needed afterwards */
 
 	result = g_spawn_async_with_pipes (NULL,
 	                                   (gchar **) argv,
diff --git a/src/libtracker-common/tracker-os-dependant-win.c b/src/libtracker-common/tracker-os-dependant-win.c
index a99184d..66c282a 100644
--- a/src/libtracker-common/tracker-os-dependant-win.c
+++ b/src/libtracker-common/tracker-os-dependant-win.c
@@ -100,6 +100,11 @@ tracker_spawn_async_with_channels (const gchar **argv,
 	g_return_val_if_fail (argv != NULL, FALSE);
 	g_return_val_if_fail (argv[0] != NULL, FALSE);
 	g_return_val_if_fail (timeout > 0, FALSE);
+	g_return_val_if_fail (pid != NULL, FALSE);
+
+	/* Note: PID must be non-NULL because we're using the
+	 *  G_SPAWN_DO_NOT_REAP_CHILD option, so an explicit call to
+	 *  g_spawn_close_pid () will be needed afterwards */
 
 	result = g_spawn_async_with_pipes (NULL,
 	                                   (gchar **) argv,



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