Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <200106191932.f5JJWm532232@pilot14.cl.msu.edu> Subject: cygipc does not seem to work!!! To: cygwin AT sources DOT redhat DOT com Date: Tue, 19 Jun 2001 15:32:48 -0400 (EDT) From: "Brian Michael Genisio" X-Mailer: ELM [version 2.4 PL25] Content-Type: text/plain Hello Cygwin people, I am trying to get a very simple shared memory application to work. It works find in linux and solaris, but in cygwin... no luck. I create the memory and attach to it with : shmid = shmget(IPC_PRIVATE, 100, IPC_CREAT|0777); strp = (char *)shmat(shmid, 0, 0); The other app gets the shmid through stdout, and through a command arg. It opens it with : strp = (char *)shmat(shmid, 0, 0); The problem is that the second application cannot open the shared memory until the first application has terminated!!! Once it does, it can read the memory with no problem. Unfortunately, it is difficult for them to communicate when the first program has already exited. I have tested it by starting the creator program, and running ipcs. ipcs does not recognize the memory either, until the program has exited. Any ideas? Has anyone else gotten it to work? Shared memory isnt that difficult... and I am not sure why I am having this problem. Thanks, Brian -- --------------------------- \\|// Brian Genisio (o o) genisiob AT pilot DOT msu DOT edu ~~oOOo~(_)~oOOo~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple