Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Patch] Fix race with signals in signal_block()
- X-seq: zsh-workers 23371
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: [Patch] Fix race with signals in signal_block()
- Date: Tue, 1 May 2007 10:38:57 +0100
- In-reply-to: <4636477B.8050608@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <4636477B.8050608@xxxxxxxx>
Guillaume Chazarain <guichaz@xxxxxxxx> wrote:
> Here is patch to fix a bug where zsh can become unkillable (except of
> course with SIGKILL), I use Linux-2.6/i386 so the POSIX_SIGNALS macro
> is defined.
>
> signal_block() and signal_unblock() use two global variables
> dummy_sigset1 and dummy_sigset2. I observed a race between
> child_block() and
> oldmask = signal_block(newmask); /* Block all signals temporarily */
> called in the zhandler() signal handler.
>
> The attached patch fixes the problem by getting rid of the global
> variables, and instead using the signal_block() and signal_unblock()
> functions.
Looking at your patch, it's hard to see what it wasn't done that way
before... I couldn't see anything obviously wrong and I've committed it.
Thanks.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview
Messages sorted by:
Reverse Date,
Date,
Thread,
Author