summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorexplorer <explorer>1999-11-06 07:37:34 +0000
committerexplorer <explorer>1999-11-06 07:37:34 +0000
commite49bccfcbe92e4e5427bc80f45ea57f72788bb85 (patch)
treef59d589f92fe04d792d02d12d8920c23de9d66e9 /devel
parent6436262d7d016bade43ba5da5e49f4e7524a14ff (diff)
downloadpkgsrc-e49bccfcbe92e4e5427bc80f45ea57f72788bb85.tar.gz
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().
Diffstat (limited to 'devel')
-rw-r--r--devel/mit-pthreads/Makefile8
1 files changed, 7 insertions, 1 deletions
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