Re: [Tracker] Killing run-away child processes
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Jamie McCracken <jamiemcc blueyonder co uk>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] Killing run-away child processes
- Date: Thu, 16 Nov 2006 01:15:58 +0000
Jamie McCracken wrote:
Jamie McCracken wrote:
Another way to do this is within tracker-extract with the extraction
performed in another thread with the main thread being a timer that
kills itself if it timeouts.
oops wrong way round - should be main thread uses for extraction with
another created thread to perform the exit on timeout
code should look like:
static void
timeout_thread (void)
{
/* sleep for 10 secs */
g_usleep (G_USEC_PER_SEC * 10);
/* die on timeout */
exit (1);
}
at start of tracker-extract :
g_thread_create ((GThreadFunc) timeout_thread, NULL, FALSE, NULL):
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]