LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-20-2004, 08:09 PM   #1
jcubed
LQ Newbie
 
Registered: Apr 2004
Location: Minneapolis, MN
Posts: 18

Rep: Reputation: 0
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

Last edited by jcubed; 10-20-2004 at 08:12 PM.
 
Old 10-20-2004, 11:09 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(RED HAT LINUX) What header file is EINTR defined? chenjifu Programming 2 01-15-2018 12:36 PM
how to send user defined signal in linux feetyouwell Linux - Software 6 12-26-2007 04:40 AM
Linux Script which uses user defined variables fieldyweb Linux - Newbie 3 09-26-2005 06:29 PM
how to define user-defined commands in linux mannoulla Linux - General 1 04-05-2005 09:01 PM
How to run user defined services and exe files on linux. Prabhat Sharda Linux - Software 6 01-05-2005 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration