[Olsr-dev] olsrd v2 and inotify

Ferry Huberts (spam-protected)
Tue May 8 15:26:42 CEST 2012



On 08-05-12 15:13, Henning Rogge wrote:
> On 05/08/2012 03:01 PM, Ferry Huberts wrote:
>> Hi Henning
>>
>> One thing I would _love_ to see in olsrd v2 is inotify integration.
>> In a way that I can hand the core a list of files I want to watch.
>> Since inotify works with a socket, I guess this shouldn't be too hard to
>> add, right?
>> We could just add it to the scheduler, it polls the inotify socket for
>> events and delivers them to the right plugin.
>>
>> This would also be very handy for automatically reloading the config
>> file when it changes.
>>
>> What do you think?
>
> The current framework code contains a function called
> "olsr_cfg_trigger_reload()", which commands the mainloop to reload the
> configuration settings defined by the command line.
>
> Should be easy to write a plugin that triggers the command when a
> certain file is changed.
>
> Henning Rogge
>
>


Yeah I know, but I meant that if the core integrates this, then things 
become _much_ easier; things become much more event driven, and at the 
same time we can avoid threading issues!

-- 
Ferry Huberts




More information about the Olsr-dev mailing list