[Kamailio-Devel] question regarding fork and kamailio global variables usage
Kalpesh Rathod
kalpeshrathod at gmail.com
Tue Jan 6 14:27:40 CET 2009
Hi Henning,
Thanks for the reply. I have got the info I was looking for.
sounds interesting, what kind of OS is this?
[kalpesh] vxworks
> To what kind of global variables do you refer to? In the shared memory the
> access to the data is guarded by the internal memory manager. You find it
> in
> the mem/shm_mem.{c,h} files.
[kalpesh] I am referring to the variables which are global by their scope,
declared outside
any function body.
>
>
> > So,after fork parent and child both interprete global data differently or
> > is there any design rule enforced that after fork no.process
> > will be writing global data. (igonre the cleanup for a while). Will there
> > be any any problem if I dont give child task its own copy of
> > global variables and let them use the same copy as parent?
>
[kalpesh] I meant:
consider global variable is_main. The interpretation of this variable is
different in
main process and the rest of the children it forks. I am looking the code
into more
details for other such type of global vars to achieve the objective of
converting
processes to threads.
Regards,
Kalpesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/devel/attachments/20090106/9f1829ca/attachment.htm
More information about the Devel
mailing list