|
From: <sv...@va...> - 2012-02-02 10:39:58
|
Author: bart
Date: 2012-02-02 10:35:18 +0000 (Thu, 02 Feb 2012)
New Revision: 12364
Log:
drd/tests/sigalrm: Report thread creation failure
Modified:
trunk/drd/tests/sigalrm.c
Modified: trunk/drd/tests/sigalrm.c
===================================================================
--- trunk/drd/tests/sigalrm.c 2012-02-02 10:14:30 UTC (rev 12363)
+++ trunk/drd/tests/sigalrm.c 2012-02-02 10:35:18 UTC (rev 12364)
@@ -72,7 +72,10 @@
sigaction(SIGALRM, &sa, 0);
}
- pthread_create(&threadid, 0, thread_func, 0);
+ if (pthread_create(&threadid, 0, thread_func, 0) != 0) {
+ fprintf(stderr, "Thread creation failed\n");
+ return 1;
+ }
// Wait until the thread is inside clock_nanosleep().
tsDelay.tv_sec = 0;
tsDelay.tv_nsec = 20 * 1000 * 1000;
|