From 75f27da0283b6db1657165726a8032828fe00254 Mon Sep 17 00:00:00 2001 From: mh17 <mh17> Date: Mon, 14 Jun 2010 10:39:05 +0000 Subject: [PATCH] wortk round to posix pthread_kill bug on the mac --- src/zmapThreads/zmapThreads.c | 5 +++-- src/zmapView/zmapView.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/zmapThreads/zmapThreads.c b/src/zmapThreads/zmapThreads.c index c8a1734f1..c632cf45a 100755 --- a/src/zmapThreads/zmapThreads.c +++ b/src/zmapThreads/zmapThreads.c @@ -31,7 +31,7 @@ * HISTORY: * Last edited: Mar 20 12:09 2009 (edgrif) * Created: Thu Jan 27 11:25:37 2005 (edgrif) - * CVS info: $Id: zmapThreads.c,v 1.11 2010-05-17 14:41:15 mh17 Exp $ + * CVS info: $Id: zmapThreads.c,v 1.12 2010-06-14 10:39:05 mh17 Exp $ *------------------------------------------------------------------- */ @@ -239,7 +239,8 @@ void zMapThreadKill(ZMapThread thread) gboolean zMapThreadExists(ZMapThread thread) { - if(pthread_kill(thread->thread_id,0) != ESRCH) +// if(pthread_kill(thread->thread_id,0) != ESRCH) + if(!pthread_kill(thread->thread_id,0)) return(TRUE); return(FALSE); } diff --git a/src/zmapView/zmapView.c b/src/zmapView/zmapView.c index d7b319306..1d9c2dbd8 100755 --- a/src/zmapView/zmapView.c +++ b/src/zmapView/zmapView.c @@ -29,7 +29,7 @@ * HISTORY: * Last edited: Jun 9 17:43 2010 (edgrif) * Created: Thu May 13 15:28:26 2004 (edgrif) - * CVS info: $Id: zmapView.c,v 1.203 2010-06-09 16:43:39 edgrif Exp $ + * CVS info: $Id: zmapView.c,v 1.204 2010-06-14 10:39:05 mh17 Exp $ *------------------------------------------------------------------- */ @@ -2489,8 +2489,8 @@ static gboolean checkStateConnections(ZMapView zmap_view) } - /* COMMENTED OUT BECAUSE zMapThreadExists() DOES NOT WORK ON THE MAC.... - AND CAUSES ZMAP TO CRASH WHEN DESTROYING A VIEW..... +// /* COMMENTED OUT BECAUSE zMapThreadExists() DOES NOT WORK ON THE MAC.... +// AND CAUSES ZMAP TO CRASH WHEN DESTROYING A VIEW..... if(!thread_has_died && !zMapThreadExists(thread)) { @@ -2499,7 +2499,7 @@ static gboolean checkStateConnections(ZMapView zmap_view) // it really is sudden death, thread is just not there threadDebugMsg(thread, "GUI: thread %s has died suddenly so cleaning up....\n", NULL) ; } - */ +// */ /* If the thread has died then remove it's connection. */ // do this before counting up the number of step lists -- GitLab