C - fork() and sharing memory

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-04-21T11:33:22Z Indexed on 2010/04/22 5:33 UTC
Read the original article Hit count: 208

Filed under:
|
|
|

I need my parent and child process to both be able to read and write the same variable (of type int) so it is "global" between the two processes.

I'm assuming this would use some sort of cross-process communication and have one variable on one process being updated.

I did a quick google and IPC and various techniques come up but I don't know which is the most suitable for my situation.

So what technique is best and could you provide a link to a noobs tutorial for it.

Thanks.

© Stack Overflow or respective owner

Related posts about c

    Related posts about fork