Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!zen.net.uk!dedekind.zen.co.uk!reader02.nrc01.news.zen.net.uk.POSTED!not-for-mail From: Nobody Subject: Re: Safe accesses of global arrays in signal handlers? Date: Tue, 25 Sep 2012 12:15:59 +0100 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.programming.threads,comp.unix.programmer References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 11 Organization: Zen Internet NNTP-Posting-Host: 735a9e4a.news.zen.co.uk X-Trace: DXC=heV5iHOia9aIgV_m`EU;eo]G;bfYi23hd=dR0\ckLKG`WeZ<[7LZNRf`;;;K30O7HhNQ<`Sf8^Tao7:KC0?6eGflkML7B7EO:hj X-Complaints-To: abuse@zen.co.uk Xref: csiph.com comp.programming.threads:1090 comp.unix.programmer:3313 On Tue, 25 Sep 2012 08:01:47 +0200, Markus Elfring wrote: > I would appreciate your advices for the clarification of the involved > implementation details. Would you like to suggest any solutions for such > an use case? The recommended way to handle signals is to block all relevant async signals in all threads, then have a single thread which does nothing but poll signals using sigwaitinfo() then handle them (e.g. by notifying condition variables, appending information to a queue, etc).