Re: [Tracker] [Patch] New CVS version
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Laurent Aguerreche <laurent aguerreche free fr>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] [Patch] New CVS version
- Date: Sat, 26 Aug 2006 13:03:39 +0100
Laurent Aguerreche wrote:
Le vendredi 25 aoÃt 2006 Ã 13:34 +0100, Jamie McCracken a Ãcrit :
Laurent Aguerreche wrote:
Small things:
- a typo in tracker_log()?
"so now shuting" => "so now shutting"?
Yes, no? :-)
er yes, fixed thanks.
sigfillset (&signal_set);
sigprocmask (SIG_BLOCK, &signal_set, NULL);
sigprocmask() is only for single-threaded processes. Replace it with
pthread_sigmask().
yup well spotted. man page for sigprocmask() says its undefined in
mutlithreaded context and should use pthread_sigmask instead.
Have now fixed in CVS
Ergo the only thread that can handle the signals in now the main thread.
I always wondered how masks on threads works and if it could make some
not-handled signals (i.e. user has to do many Ctrl+C to just see one
handled...). But I read some docs and it seems that only one thread with
a correct mask is needed. So it should work!
Well I originally only expected the main thread to handle it as I only
defined the signal handler and sig mask there. I did not realise that
created threads inherit the creators sig mask and handler and therefore
they would need to be set to explicitly block those signals hence the
cock-up!
I believe this should fix all outstanding issues and it should therefore
never crash or hang on exit.
Please test latest CVS to confirm this is the case.
Ok, I just wanted to point the problem with sigprocmask().
yes thank you - please keep pointing out any other dodgy stuff :)
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]