I am a beginner on C program, and got a question between worker process.
I write a program which fork a child process, inside the process, it create 2 threads to run and get some values from DB; however, if I fork 2 process, it will create 4 threads totally
I wonder the "extern variables" will be share within this 2 processes? Or independent?
If the variables are not shared, how could I maintenance the consistency between the processes?
(Sorry for my poor english)
Thanks all!!