From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4FFAD0DA.10306@xenomai.org> Date: Mon, 09 Jul 2012 14:38:50 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <4F534D1A615F544D95E57BFD8460658302ED62BD@GEO-HCLT-UKEVS1.GEO.CORP.HCL.IN> In-Reply-To: <4F534D1A615F544D95E57BFD8460658302ED62BD@GEO-HCLT-UKEVS1.GEO.CORP.HCL.IN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] shared memory segments List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jorge Ramirez Ortiz, HCL Europe" Cc: "xenomai@xenomai.org" On 07/09/2012 12:26 PM, Jorge Ramirez Ortiz, HCL Europe wrote: > Hi all, I am doing a port of a shared library; in this library , a > shared memory segment is being mapped (now using the Xenomai POSIX > skin.) Some semaphores and data are placed on that shared segment. > > Is there a way to mark the shared memory segment for deletion > (unlink) after the last process detaches it (basically what > shmctl(shmid, IPC_RMID, &shmInfo) does) cheers Jorge No, but you can "shm_unlink" it when the last process has attached, this will make it inaccessible to new processes, but still usable by processes already attached. And the shared memory segment will be destroyed when the last process detaches. -- Gilles.