Date: Fri, 22 Nov 2013 17:20:58 +0200 From: Vitaly Magerya <vmagerya@gmail.com> To: Jilles Tjoelker <jilles@stack.nl>, Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-hackers@freebsd.org, davidxu@freebsd.org, threads@freebsd.org Subject: Re: Problem with signal 0 being delivered to SIGUSR1 handler Message-ID: <528F765A.8040306@gmail.com> In-Reply-To: <20131122133553.GA28457@stack.nl> References: <528DFEE6.6020504@gmail.com> <20131121211546.GQ59496@kib.kiev.ua> <20131122133553.GA28457@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/22/2013 15:35, Jilles Tjoelker wrote: > This patch fixes the problem for me on stable/9 and head. > > Index: lib/libthr/thread/thr_sig.c > =================================================================== > --- lib/libthr/thread/thr_sig.c (revision 258178) > +++ lib/libthr/thread/thr_sig.c (working copy) > @@ -326,12 +326,12 @@ check_deferred_signal(struct pthread *curthread) > uc_len = __getcontextx_size(); > uc = alloca(uc_len); > getcontext(uc); > - if (curthread->deferred_siginfo.si_signo == 0) > - return; > __fillcontextx2((char *)uc); > act = curthread->deferred_sigact; > uc->uc_sigmask = curthread->deferred_sigmask; > memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t)); > + if (curthread->deferred_siginfo.si_signo == 0) > + return; > /* remove signal */ > curthread->deferred_siginfo.si_signo = 0; > handle_signal(&act, info.si_signo, &info, uc); > I can confirm that this also solves the problems I'm seeing.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?528F765A.8040306>