🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #91

Shared Memory and Semaphores

#91
From: Rick Thompson
Date: Thu, 23 Jul 1992 15:51
21 lines
1212 bytes
Hello,

  I have a couple questions regaurding shared memory and semaphores.

  1)  I've created a shared memory area using shmget and my processes
      can communicate correctly.  However, it is possible for any one of
      the processes to remove the partion even though the others are still
      using it.  The processes are all running under the same user so any
      process has permission to remove it.  Is there a way to prevent the
      removal if the memory is still in use?

  2)  I need the ability to lock out a portion of shared memory in
      some critical regions of the code.  Is it possible using semget and
      semctl to do this?  Again, the processes using the shared memory are
      running under the same user.


      Thanks,

      Rick  rickt@gvl.unisys.com
Technical Details
Message-ID: <1992Jul23.155158.8075@gvl.unisys.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!udel!gvls1!gvls1!rickt

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!udel!gvls1!gvls1!rickt
From: rickt@gvls1.gvl.unisys.com (Rick Thompson)
Subject: Shared Memory and Semaphores
Message-ID: <1992Jul23.155158.8075@gvl.unisys.com>
Sender: rickt@gvl.unisys.com
Nntp-Posting-Host: gvls1
Organization: Unisys Defense Systems, Great Valley Labs, Paoli, Pa
Date: Thu, 23 Jul 1992 15:51:58 GMT
Lines: 22