unit-tests: Prevent a failing worker thread to go wild after it fails
A worker raises SIGUSR1 to inform the main thread that the test fails. The main thread then starts cancelling workers, but the offending thread should be terminated immediately to prevent it from test continuation.
This commit is contained in:
1 parent
96e3142c39
commit
4e8ff4f010
1 file changed
+2
-1
@@ -136,7 +136,8 @@ static inline void test_failure()
|
||||
else
|
||||
{
|
||||
pthread_kill(main_thread, SIGUSR1);
|
||||
/* how can we stop just the thread? longjmp to a restore point? */
|
||||
/* terminate thread to prevent it from going wild */
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user