]> git.meshlink.io Git - meshlink/blobdiff - test/echo-fork.c
Don't use assert() to check the results of pthread_*() calls.
[meshlink] / test / echo-fork.c
index aae7531f554a4d847043c40a4050a42cefbf3410..7fe0ab843fdcc6c9fde3cb8ba4c40bf8a8bf712d 100644 (file)
@@ -1,4 +1,9 @@
 #define _GNU_SOURCE
+
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -169,7 +174,11 @@ static int main2(void) {
 }
 
 
-int main() {
+int main(void) {
+       init_sync_flag(&a_started);
+       init_sync_flag(&a_stopped);
+       init_sync_flag(&b_responded);
+
        meshlink_set_log_cb(NULL, MESHLINK_WARNING, log_cb);
 
        // Initialize and exchange configuration.