From cccdf393c5223b84ec3ca8c67d65772f071de973 Mon Sep 17 00:00:00 2001 From: explorer Date: Sat, 6 Nov 1999 07:37:34 +0000 Subject: Fix a rather nasty problem with signals, namely SIGCHLD, that prevented running threaded binaries if SIGCHLD was set to SIG_IGN. What happens is that pthreads uses either sigaction() or signal() to set up signals when switching thread state. It used HAVE_SYSCALL_SIGACTION to decide which to use. But, while we have a FUNCTION called sigaction(), the syscall is __sigaction14, which caused HAVE_SYSCALL_SIGACTION to not be defined. This would have been ok if the pthread kernel didn't assume signal would return 0 for success and non-zero for failure. Signal() returns the previous handler. SIG_IGN != 0, so pthreads thought the call failed. Resulting in a call to abort(). --- devel/mit-pthreads/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'devel') diff --git a/devel/mit-pthreads/Makefile b/devel/mit-pthreads/Makefile index eb7c17fa104..3c6be7ffdae 100644 --- a/devel/mit-pthreads/Makefile +++ b/devel/mit-pthreads/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 1999/11/05 17:16:40 explorer Exp $ +# $NetBSD: Makefile,v 1.23 1999/11/06 07:37:34 explorer Exp $ # DISTNAME= pthreads-1_60_beta6 @@ -19,6 +19,12 @@ CONFIGURE_ARGS+= --prefix=${PREFIX}/pthreads post-patch: @${RM} ${WRKSRC}/include/endian.h +post-configure: + @echo "#define HAVE_SYSCALL_SIGACTION 1" >> ${WRKSRC}/config.h + @echo "#define HAVE_SYSCALL_SIGPAUSE 1" >> ${WRKSRC}/config.h + @echo "#define HAVE_SYSCALL_SIGPROCMASK 1" >> ${WRKSRC}/config.h + @echo "#define HAVE_SYSCALL_SIGSUSPEND 1" >> ${WRKSRC}/config.h + pre-install: ${MKDIR} ${PREFIX}/pthreads -- cgit v1.2.3