Re: [gamin] gamin patch



On Thu, Aug 05, 2004 at 10:22:06AM -0400, Daniel Veillard wrote:
> On Wed, Aug 04, 2004 at 09:24:46PM -0400, John McCutchan wrote:
> > Yo,
> > 
> > Attached is a patch that contains:
> > 
> > -An updated inotify backend
> > 	This new backend does not need the poll backend.
> 
>   Okay, however I dislike "GAMIN_EVENT_UNKNOWN" I have no idea what
> it means, where it can come from, etc ... That should be fixed.
> Applied anyway.

I added that so I can return a value from the enum. Inotify
has more expressive events than FAM does, so when I can't map
an inotify even to a gamin event i toss it out. I could
get rid of that, and have a bool function that tells me
if the event can be handled by FAM.

> 
> > -Change the retry delay from 100 to 1000 microseconds
> > 
> > 	At 100 I found it was retrying too fast
> 
>   No, I disagree, 10 times a second is not much. Is "found"
> based on a real problem or a perception from your part ? 
> In case forking the gam_server fails then this introduce a 25
> second delay in that routine, I disagree with that change,
> not applied.

usleep is in microseconds. usleep(100) sleeps for only 1/1000th of 
a second. usleep(1000) sleeps for 1/100th of a second. So with
1000 it is only a 25 millisecond delay. I found that when
gnome-panel is starting up, each applet tries to spawn a gam_server
and then each one loops about 15-16 times before being able
to connect to the server. With the 1000 microsecond delay, 
each applet would only loop about 2 times.

> 
> > -Changes the failure code for gam_server when it can't load
> > the subscription backend or it can't start the server
> > 
> > 	This is a real bug. gam_server would call g_error()
> > 	when it couldn't start the server and dump core.
> > 	gam_server not starting is not an error [as seen
> > 	in the startup races]
> > 
> > 	Also the inotify backend could fail to startup
> > 	if more than 8 programs have opened /dev/inotify.
> > 	
> > 	in this two cases, the g_error() turns in to gam_debug()
> > 	and we exit.
> 
>   Okay, sensible, applied,
> I will probably release 0.0.5 this afternoon,

Great. 

I was going to tackle some of the code sharing between server
and library. Would putting it under src/ and making a static
library called gamin_shared.a work for you?

John



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