This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
It should be pretty trival to fix boehm-gc to block SIGCHLD. Basically you should just need to copy the pthread_sigmask() code from block_sigchld in posix-threads.cc into GC_pthread_create in solaris_pthreads.c. I think it would be fine to make that change in order to fix this problem, so please submit a patch.
Indeed, if I'm allowed to directly patch Boehm GC, the fix is trivial. Attached, tested on SPARC64/Solaris 9.
2005-02-16 Eric Botcazou <ebotcazou@libertysurf.fr>
* solaris_threads.c (GC_thr_daemon): Block SIGCHLD.
------------------------------------------------------------------------
Index: solaris_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/solaris_threads.c,v
retrieving revision 1.12
diff -u -p -r1.12 solaris_threads.c
--- solaris_threads.c 16 Aug 2004 16:32:26 -0000 1.12
+++ solaris_threads.c 15 Feb 2005 23:09:05 -0000
@@ -743,7 +743,13 @@ void * GC_thr_daemon(void * dummy)
register GC_thread t;
register int i;
register int result;
- + sigset_t mask;
+
+ /* Libgcj's ProcessManager requires that SIGCHLD be delivered to it. */
+ sigemptyset (&mask);
+ sigaddset (&mask, SIGCHLD);
+ thr_sigsetmask (SIG_BLOCK, &mask, NULL);
+
for(;;) {
start:
result = thr_join((thread_t)0, &departed, &status);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |