The code in lib/tevent/tevent_signal.c:tevent_common_signal_handler_info does not correctly switch off further signals when TEVENT_SA_INFO_QUEUE_COUNT is reached. This is at least the case for FreeBSD 8.0. I am not sure yet about subsequent releases. The code is: if (count+1 == TEVENT_SA_INFO_QUEUE_COUNT) { /* we've filled the info array - block this signal until these ones are delivered */ sigset_t set; sigemptyset(&set); sigaddset(&set, signum); sigprocmask(SIG_BLOCK, &set, NULL); TEVENT_SIG_INCREMENT(sig_state->sig_blocked[signum]); } Under FreeBSD 8.0 we have to use: sigaddset(&((ucontext_t *)uctx)->uc_sigmask, signum); and include <sys/ucontext.h>. It seems that we need a configure test or something for this, but I am not sure how to detect it.
Perhaps we need a symbol like NEED_FREEBSD_STYLE_SIGBLOCK in config.h.
Perhaps something like: dnl We need to use a fugly hack to stop further signals on FreeBSD AC_MSG_CHECKING([whether to use FreeBSD Style signal stopping]) case "$host" in *-freebsd*) AC_DEFINE(NEED_FREEBSD_SIGSTOP, "yes", [need FreeBSD style signal stopping]) ;; esac
Created attachment 8429 [details] git-am patchset for 4.0.x and master. Richard, please review and push to master if you're happy with this. I'll also create a 3.6.x version. Jeremy.
Created attachment 8434 [details] git-am patchset for 3.6.next.
Comment on attachment 8429 [details] git-am patchset for 4.0.x and master. Looks good to me
(In reply to comment #3) > Created attachment 8429 [details] > git-am patchset for 4.0.x and master. > > Richard, please review and push to master if you're happy with this. I should be able to push this tonight.
Richard, Metze already pushed this (and Karolin already pushed to 4.0.next). Just give the 3.6 version a +1 and I'll re-assign to Karolin for inclusion. Cheers, Jeremy.
Comment on attachment 8434 [details] git-am patchset for 3.6.next. Looks good.
Re-assigning to Karolin for inclusion in 3.6.next. Jeremy.
Pushed to v3-6-test. Closing out bug report. Thanks!
This is needed for 4.0 too
(In reply to comment #11) > This is needed for 4.0 too Pushed to autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!