Hello.
I hope I can ask this in here.
This involves running concurrent processes in UNIX using
fork().
Does anyone know how to pass variables from a parent process
to a child process?
e.g I have a variable producer. Then I create a child process.
char producer = 'A';
int pid = fork(); // now we have 2 processes
I want to increment producer to 'B' and pass it to the child.
The other way of doing this is creating a variable which is
shared in memory so that any process can access it.
I have no idea how to make shared memory variables either.
Any ideas.
-L
--- Blue Wave/DOS v2.30
---------------
* Origin: **Sawasdi BBS** sawasdi.apana.org.au 61 8 82617802 (3:800/846)
|