Module Name:    src
Committed By:   joerg
Date:           Wed Mar 23 13:57:04 UTC 2011

Modified Files:
        src/tests/lib/semaphore: sem.c

Log Message:
Explicitly terminate threads to prevent crashes on exit.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/semaphore/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/semaphore/sem.c
diff -u src/tests/lib/semaphore/sem.c:1.7 src/tests/lib/semaphore/sem.c:1.8
--- src/tests/lib/semaphore/sem.c:1.7	Wed Nov 10 11:14:12 2010
+++ src/tests/lib/semaphore/sem.c	Wed Mar 23 13:57:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sem.c,v 1.7 2010/11/10 11:14:12 pooka Exp $	*/
+/*	$NetBSD: sem.c,v 1.8 2011/03/23 13:57:04 joerg Exp $	*/
 
 /*
  * Common code for semaphore tests.  This can be included both into
@@ -159,6 +159,9 @@
 	}
 	if (i == 1000)
 		atf_tc_fail("sem destroy not reporting EBUSY");
+
+	pthread_cancel(pt);
+	pthread_join(pt, NULL);
 }
 
 ATF_TC(blockwait);
@@ -194,6 +197,9 @@
 		sem_post(&semmarit[1]);
 
 	}
+
+	pthread_cancel(pt);
+	pthread_join(pt, NULL);
 }
 
 ATF_TC(named);

Reply via email to