LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   IPC_ALLOC not defined in Linux. (https://www.linuxquestions.org/questions/linux-software-2/ipc_alloc-not-defined-in-linux-245310/)

jcubed 10-20-2004 08:09 PM

IPC_ALLOC not defined in Linux.
 
I need to write a program using POSIX shared memory between 2 processes that are NOT spawned by a fork or exec. The only example I have uses IPC_ALLOC, but that is not defined in Fedora Core 2's implementation of POSIX's shmget. Can anyone point me to a good example for Linux doing this?

I am not asking for anyone to do my assignment; I'm not even giving the details of the assignment. I would just like to know how to tell process A (which stores world) that the memory allocated by shmget will be allocated by process B (which stores hello and then prints the contents when more has been added).

This question is similar to this question, which never got an answer:
http://www.linuxquestions.org/questi...ight=IPC_ALLOC

Thanks!
- JJJ

foo_bar_foo 10-20-2004 11:09 PM

It seems to me like a case for memmory mapping but i'm not so good with this stuff.
get the source code for the book
http://www.advancedlinuxprogramming.com
look at chapter 5 examples mmap-write.c and mmap-read.c


All times are GMT -5. The time now is 05:33 AM.