Problem with signal 0 being delivered to SIGUSR1 handler
Vitaly Magerya
vmagerya at gmail.com
Fri Nov 22 15:21:06 UTC 2013
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.
More information about the freebsd-threads
mailing list