[tracker/tracker-0.6] Do not make tracker-indexer commit suicide if tracker-extract doesn't get along.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Do not make tracker-indexer commit suicide if tracker-extract doesn't get along.
- Date: Fri, 17 Apr 2009 07:55:02 -0400 (EDT)
commit 3b358817fabc72eba51c35dfe7d7b59f5f3029d8
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 17 13:51:58 2009 +0200
Do not make tracker-indexer commit suicide if tracker-extract doesn't get along.
If tracker-extract fails to return the PID. extractor_pid is 0, so if
tracker-indexer tries to kill it afterwards, it ends up killing itself.
---
.../tracker-module-metadata-utils.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/tracker-indexer/tracker-module-metadata-utils.c b/src/tracker-indexer/tracker-module-metadata-utils.c
index 964d594..8e15ccf 100644
--- a/src/tracker-indexer/tracker-module-metadata-utils.c
+++ b/src/tracker-indexer/tracker-module-metadata-utils.c
@@ -288,7 +288,12 @@ extractor_context_destroy (ExtractorContext *context)
static void
extractor_context_kill (ExtractorContext *context)
{
- g_message ("Attempting to kill tracker-extract with SIGKILL");
+ g_message ("Attempting to kill tracker-extract with SIGKILL");
+
+ if (context->pid == 0) {
+ g_warning (" No PID for tracker-extract");
+ return;
+ }
if (kill (context->pid, SIGKILL) == -1) {
const gchar *str = g_strerror (errno);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]