summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/sem_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/sem_test.c b/test/sem_test.c
index 1399229..bcc4116 100644
--- a/test/sem_test.c
+++ b/test/sem_test.c
@@ -65,7 +65,10 @@ main(int argc, char** argv)
printf("Testing %u signals...\n", n_signals);
- zix_sem_init(&sem, 0);
+ if (zix_sem_init(&sem, 0)) {
+ fprintf(stderr, "Failed to create semaphore.\n");
+ return 1;
+ }
ZixThread reader_thread;
if (zix_thread_create(&reader_thread, 128, reader, NULL)) {