From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4B757306.5070102@domain.hid> Date: Fri, 12 Feb 2010 16:25:58 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <4B757217.3060406@domain.hid> In-Reply-To: <4B757217.3060406@domain.hid> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-core] Yet another ((weak)) bug List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai-core Jan Kiszka wrote: > Hi Gilles, > > this one requires some fixing too: > > xeno_sem_heap is marked weak. xeno_init_sem_heaps is called once per > initialized skin. It unmaps any existing heap and creates a new one. > That's already fragile during constructor run, but it's lethal during > process runtime, ie. when using dlopen. > > I think the solution is to handle forks separately and only remap in > that case. Digging in this direction now. > > BTW, what triggers the re-run of xeno_init_sem_heaps after a fork so far? It must be done for the child process to get a private heap different from the parent process. I would guess it is handled by pthread_atfork. -- Gilles.