in reply to fork() and global variables
Separate processes do not share data, unless they specifically set up a shared memory segment.
You should question yourself if you really want to fork in this case. Your goal is probably to do two things simultaneously. Traditionally there are three ways of doing so: separate processes (fork()), a select/event-loop, and threading (which is somewhere in between, it depends on the threading implementation where in between it is). Since graphical toolkits like Gtk already have some form of an event-loop, you are probably better off using that.
Abigail
|
|---|