Hi, I am porting kamailio to the OS which doesnt support fork. For the OS, tasks are similar to threads of same process in Linux.
In this environment, child task(s) will share the global and heap data with parent instead of having separate copy of the data. Its analogus to using mutiple threads instead of multiple processes in kamailio. My question is , kamailio supports USE_SHM_MEM which allows all the pkg_mallocs to become shm_malloc. This way I dont need to be concerned about access of data in heap while porting because code is designed that way. Is my understanding true? How are the global variables accessed? especially, though data is in shared mem, the variable holding address of data is defined as global variable. 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? Please guide me. Regards, Kalpesh
_______________________________________________ Devel mailing list [email protected] http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
