Re: [Tracker] Killing run-away child processes



Edward Duffy wrote:
On 11/15/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
Edward Duffy wrote:
> Text filtering, metadata extraction, and thumbnail generation are all
> handled out of process so they can't crash trackerd.  However these
> processes are called with g_spawn_sync and there's no gaurentee they
> will come back.
>
> Here's a patch that will set SIGALRM for these external processes, it
> uses the child_setup callback function, so there's no need for every
> possible child process to set its own alarm.
>
>

so we get back a SIGALRM signal which we dont currently handle after 30
secs?

that's the idea

dont we need a way to kill these external processes if they timeout?

nope..that's what alarm is for.  Put "while (1);" in tracker-extract.c
if you want to try it out.

(kinda tricky without the pids although we could execute "killall -9
tracker-extract" though that wont do for the other types and is a bit
hacky!)

that's why there's alarm!  trackerd doesn't get the alarm, the child
process does.


oh sorry  -  default action for SIGALRM is to terminate so you are right

scrap other idea


--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/




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