site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcaE8h0ZD1Nq/HCJSnScmCUh47uY/g== 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Philip Lukidis