summaryrefslogtreecommitdiff
path: root/devel/mit-pthreads
diff options
context:
space:
mode:
authorexplorer <explorer@pkgsrc.org>1999-11-06 07:37:34 +0000
committerexplorer <explorer@pkgsrc.org>1999-11-06 07:37:34 +0000
commitcccdf393c5223b84ec3ca8c67d65772f071de973 (patch)
treef59d589f92fe04d792d02d12d8920c23de9d66e9 /devel/mit-pthreads
parent65d08227c860d8f73cc00c1c4dbadfcd7cf4aeb3 (diff)
downloadpkgsrc-cccdf393c5223b84ec3ca8c67d65772f071de973.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/mit-pthreads')
-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