[olsr-dev] fork() in main kills plugin's threads

Andreas Tønnesen (spam-protected)
Sun Dec 19 00:32:09 CET 2004



Jens Nachtigall wrote:
> I know, I could simply always create a new pthread whenever the plugin's 
> function is scheduled, so creating the pthread after fork() (this would 
> be suboptimal, but would not also hurt much). However, that fork() 
> kills the pthreads seems odd to me, any ideas on how to change this?

I guess doing the fork prior to loading plugin fixes this? If so we'll
change that for 0.4.9.

> BTW: register_olsr_param is called before olsr_plugin_init(). Since one 
> might want to set some default values in olsr_plugin_init, it should be 
> vice versa imho.

I don't agree. Plugins do their initializations based on their setting
parameters, these parameters must be set before calling the
initialization functions. If this is changed the param registration
function will end up doing initialization as far as I can see - this is
not desired behaviour. Handeling default values should really not 
present any problems as far as I can see.

- Andreas

-- 
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list