• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
POSIX shared memory question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

POSIX shared memory question


  • Subject: POSIX shared memory question
  • From: "Philip Lukidis" <email@hidden>
  • Date: Wed, 31 May 2006 16:38:03 -0400
  • Thread-topic: POSIX shared memory question

Hello.  I have a question for using POSIX shared memory.  There is a possibility that my process could crash before it would have called shm_unlink.  I have two basic questions:

a) What is the best method to deal with cleanup?  I guess catching as many relevant signals as possible and cleaning up might help (SIGSEGV, SIGBUS, SIGABRT come to mind, though I'm not sure I could catch them), but is there a better approach, or complementary operations?  There are at least two signals which I cannot catch.  According to the manpage of shm_open, shared memory references do not survive a reboot, but I'd like to keep the filesystem as clean as possible.
b) After I create the shared memory object via shm_open, call ftruncate, and map it via mmap, should I not see the object in the filesystem (well, after shm_open at least)?  So far I cannot find it through the shell, yet no error is returned in my code.  Is it created in a different namespace?  How can I view all created shared memory objects in the system?

thanks for any help,

Philip Lukidis
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: POSIX shared memory question
      • From: Brian Bergstrand <email@hidden>
  • Prev by Date: Re: forward-porting
  • Next by Date: Re: POSIX shared memory question
  • Previous by thread: Re: forward-porting
  • Next by thread: Re: POSIX shared memory question
  • Index(es):
    • Date
    • Thread