Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2006 13:15:21 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        threads@freebsd.org
Subject:   Re: GHC 6.4.3 on FreeBSD (fwd)
Message-ID:  <Pine.GSO.4.64.0608071313210.5874@sea.ntplx.net>
In-Reply-To: <20060807151829.T45647@fledge.watson.org>
References:  <20060807151829.T45647@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 7 Aug 2006, Robert Watson wrote:

>
> I've been talking to the Haskell folk about problems they've had getting 
> their threaded runtime running on FreeBSD.  Here's one of their problem 
> reports. Since I'm not up on how threads and signals are supposed to act, I 
> can't confirm the below is a bug, of course, but figured you (experts) would 
> be able to respond better.

Try this patch.

-- 
DE

Index: thread/thr_sig.c
===================================================================
RCS file: /opt/FreeBSD/cvs/src/lib/libpthread/thread/thr_sig.c,v
retrieving revision 1.85
diff -u -r1.85 thr_sig.c
--- thread/thr_sig.c	9 Jun 2006 14:23:40 -0000	1.85
+++ thread/thr_sig.c	7 Aug 2006 16:37:50 -0000
@@ -1095,6 +1095,11 @@
  	struct pthread *curthread = _get_curthread();
  	struct kse_mailbox *kmbx;

+	if ((curthread->kse->k_flags & KF_STARTED) == 0) {
+		(void)__sys_kill(getpid(), sig);
+		return;
+	}
+
  	if (pthread->attr.flags & PTHREAD_SCOPE_SYSTEM) {
  		kse_thr_interrupt(&pthread->tcb->tcb_tmbx, KSE_INTR_SENDSIG, sig);
  		return;




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0608071313210.5874>