Lately I've encountered an interesting situation:
I've defined a global static variable in a dynamically linked library (.so). This library always being called under fork().
What I've noticed is that the global variable always being called with init values, and doesn't change them between the calls.
I have a few questions about that:
Why does being 'forked' change the basic method of memory update for this variable? I thought that global variable has a specific memory mapping
Is anyone familiar with a method to bypass it? I only thought on a way in which I write the data to Kernel memory space (using mmap)
Thank you all!