Question: are global variables shared by processes?
Answer: Global variables are still global within its own process. So the answer is no, global variables are not shared between processes after a call to fork(). No, since global variables are not shared between processes unless some IPC mechanism is implemented. The memory space will be copied.